5 10 REM ******************************************************************** 20 REM * Programma S2DEB1 Rel 1.0 utilizzando MCS BASIC 52 * 15 REM * per le schede GPCF2 e DEB01 * 30 REM * GRIFO(R) via Dante, 1 40016 S.Giorgio di Piano (BO) * 40 REM * Tel.(051)89.20.52 FAX.(051)89.86.61 * 50 REM * * 60 REM * Visualizza sul terminale il tasto premuto da tastiera * 70 REM * esadecimale a bordo della DEB01 * 80 REM * * 90 REM * by Pedrielli Adriano. 19 AGOSTO 1991 * 95 REM ******************************************************************** 100 REM 102 REM Per il collegamento fra le due schede occorre un flat inserito nel 103 REM connettore CN2 da 20 vie della GPCF2 e nel connettore CN4 della 104 REM DEB01 105 REM 110 REM ************************* Main program ************************* 120 REM ********** Inizializzo port A in out ,port C meta input e output 140 XBY(64003)=129 150 REM ********** Rilevamento tasto 160 B=4 170 XBY(64002)=2**B 180 C=XBY(64002) 190 E=C-(INT(C/16)*16) 193 REM ********** Controllo se il tasto viene tenuto premuto 196 IF C=D THEN GOTO 170 198 D=C 200 REM ********** Controllo numero tasti premuti nella colonna scelta 210 IF E<15 THEN GOTO 300 220 B=B+1 230 IF B>7 THEN GOTO 160 240 GOTO 170 300 IF C<31 THEN GOTO 400 310 IF C>134 THEN GOTO 700 320 IF C>70 THEN GOTO 600 330 IF C>38 THEN GOTO 500 380 REM ********** Tabelle conversioni ************ 400 IF C=30 THEN PRINT 1 : REM ******* TASTO 1 410 IF C=29 THEN PRINT 4 : REM ******* TASTO 4 420 IF C=27 THEN PRINT 7 : REM ******* TASTO 7 430 IF C=23 THEN PRINT " A":REM ****** TASTO A 440 GOTO 170 500 IF C=46 THEN PRINT 2 : REM ******* TASTO 2 510 IF C=45 THEN PRINT 5 : REM ******* TASTO 5 520 IF C=43 THEN PRINT 8 : REM ******* TASTO 8 530 IF C=39 THEN PRINT 0 : REM ******* TASTO 0 535 GOTO 170 600 IF C=78 THEN PRINT 3 : REM ******* TASTO 3 610 IF C=77 THEN PRINT 6 : REM ******* TASTO 6 620 IF C=75 THEN PRINT 9 : REM ******* TASTO 9 630 IF C=71 THEN PRINT " B":REM ****** TASTO B 635 GOTO 170 700 IF C=142 THEN PRINT " C":REM ****** TASTO C 710 IF C=141 THEN PRINT " D":REM ****** TASTO D 720 IF C=139 THEN PRINT " E":REM ****** TASTO E 730 IF C=135 THEN PRINT " F":REM ****** TASTO F 735 GOTO 170