10 REM PC-BASIC test 
20 REM FOR overflows
30 OPEN "OUTPUT.TXT" FOR OUTPUT AS 1
40 ON ERROR GOTO 1000
50 FOR I%= -32768! TO -32766:PRINT#1, I%: NEXT
60 FOR I%= 32766 to 32767 STEP 2: PRINT#1, I%: NEXT
1000 PRINT#1, "Error:", ERR, ERL
1010 RESUME NEXT
