Maybe, but this is how I did things:
Code: Select all
10 REM Hardware port test program
20 CLS : LET exit=0
30 LET port=255: LET data=0
40 PRINT “Hardware port test program”
50 PRINT “Enter a port address, then data to output to port.”
100 FOR M=1 TO 1 STEP 0: REM Main loop
110 GO SUB 1000: REM Get User input
120 GO SUB 2000: REM Output to external hardware
130 GO SUB 3000: REM Update screen
140 IF exit THEN LET M=2: REM ‘exit’ set if user wants to end
150 NEXT M
160 CLS
170 GO TO 9999: REM jump to last line, then end.