NEW 10 REM Programa de teste 1 11 REM 12 REM Activa uma linha na porta paralela por um periodo de tempo curto 13 REM 14 REM Saida do Teclado BORIS 15 REM "1" Tecla = Bit 0 = Perna 5 16 REM "2" Tecla = Bit 1 = Pernas 4 & 6 17 REM "3" Tecla = Bit 2 = Levantamento do lado esquerdo 18 REM "4" Tecla = Bit 3 = não utilizado 19 REM "5" Tecla = Bit 4 = não utilizado 20 REM "6" Tecla = Bit 5 = Levantamento do lado direito 21 REM "7" Tecla = Bit 6 = Pernas 1 & 3 22 REM "8" Tecla = Bit 7 = Perna 2 23 REM 30 DELAY = 200: REM Atraso no tempo, aumentar para ser maior 40 LPRINT CHR$(0); : REM Limpar porta 50 PRINT "Pressionar de 1 até 8 para activar os bit's, Q para terminar" 100 A$ = INKEY$: REM Qual a tecla pressionada 110 IF A$ = "1" THEN LPRINT CHR$(1); : GOTO 200: REM bit 0 120 IF A$ = "2" THEN LPRINT CHR$(2); : GOTO 200: REM bit 1 130 IF A$ = "3" THEN LPRINT CHR$(4); : GOTO 200: REM bit 2 140 IF A$ = "4" THEN LPRINT CHR$(8); : GOTO 200: REM bit 3 150 IF A$ = "5" THEN LPRINT CHR$(16); : GOTO 200: REM bit 4 160 IF A$ = "6" THEN LPRINT CHR$(32); : GOTO 200: REM bit 5 170 IF A$ = "7" THEN LPRINT CHR$(64); : GOTO 200: REM bit 6 180 IF A$ = "8" THEN LPRINT CHR$(128); : GOTO 200: REM bit 7 190 IF A$ = "q" OR A$ = "Q" THEN LPRINT CHR$(0); : END 195 GOTO 100 200 REM Loop do atraso 210 FOR I = 1 TO DELAY 220 NEXT I 230 LPRINT CHR$(0); : REM Depois do atraso, limpar a saida 240 GOTO 100