10 REM PC-BASIC test 
20 REM ON KEY syntax
30 OPEN "OUTPUT.TXT" FOR OUTPUT AS 1
40 ON ERROR GOTO 1000
42 ON KEY("") GOSUB 500
44 ON KEY GOSUB 500
45 ON KEY(-1) GOSUB 500
46 ON KEY(3) GOSUB 500
47 ON KEY(0) GOSUB 500
48 ON KEY(256) GOSUB 500
49 ON KEY(32768) GOSUB 500
400 END
500 RETURN
1000 PRINT#1, ERR, ERL
1010 RESUME NEXT
