10 REM PC-BASIC test 
20 REM IOCTL syntax
30 ON ERROR GOTO 1000
35 OPEN "X" FOR OUTPUT AS 1
40 IOCTL
50 IOCTL 1, ""
60 IOCTL#1, ""
70 IOCTL #1, "" YEAH
80 IOCTL#1, 12
90 IOCTL "HI"
100 IOCTL "HI" LPRINT
110 END
1000 OPEN "OUTPUT.TXT" FOR APPEND AS 3
1010 PRINT#3, ERR, ERL
1020 CLOSE 3
1030 RESUME NEXT
