1000 '"ASCICHAR" Displays or prints ascii characters
1010 ' By Robert Hamilton
1020 PROG1$="        A S C I C H A R        "
1025 REV$ = "          Rev: 830120          "
1030 PROG2$="      By Hamilton Company      "
1040 PROG3$="                               "
1050 PROG4$="NOTE: ASCICHAR displays printable ASCII characters on screen or printer"
1052 SCREEN 0,0,0:WIDTH 80:COLOR 2,0,0:KEY OFF:CLS:UP$=STRING$(1,30)
1053 LOCATE ,,1,12,13:DEF SEG=0:IF PEEK (&H410)= 109 THEN LOCATE ,,,6,7
1054 DEF SEG=64:POKE 23,128:DEF SEG:CL$=STRING$(79,0):Q$=CHR$(34)
1090      REM: ?? KEYS
1100 CL$=STRING$(79,0):Q$=CHR$(34):UP$=STRING$(1,30)
1110 FOR I=1 TO 10:ON KEY(I) GOSUB 0:KEY(I) ON:NEXT
1120 KEY OFF: KEY 1,CHR$(27)+"CLS:LIST  "
1130 KEY 2,CHR$(27)+"RUN  "+CHR$(7):KEY 3,CHR$(27)+"LOAD"+CHR$(7)+CHR$(34)
1140 KEY 4,CHR$(27)+"SAVE"+CHR$(34):KEY 5,CHR$(27)+"RUN"+CHR$(7)+CHR$(34):KEY 6,CHR$(27)+"GOTO 1000"
1150 KEY 7,CHR$(27)+CHR$(12)+"FILES "+CHR$(34)+"A:*.*":KEY 8,CHR$(27)+"RENUM 1000"
1160 KEY 9,CHR$(12)+"COLOR 6,0:CLS"+CHR$(13):KEY 10,CHR$(27)+"RUN"+CHR$(34)+"AUTOST"
1170 ON ERROR GOTO 1430
1180      REM: ?? TITLE
1190 CLS:LOCATE 3,25:PRINT CHR$(213)+STRING$(31,205)+CHR$(184)
1200 PRINT TAB(25);CHR$(179)+STRING$(31,32)+CHR$(179)
1210 PRINT TAB(25);CHR$(179)+PROG1$;CHR$(179)
1220 PRINT TAB(25);CHR$(179)+STRING$(31,32)+CHR$(179)
1230 PRINT TAB(25);CHR$(179);REV$;CHR$(179)
1240 PRINT TAB(25);CHR$(179)+STRING$(31,32)+CHR$(179)
1250 PRINT TAB(25);CHR$(212)+STRING$(31,205)+CHR$(190)
1260 PRINT CHR$(10);TAB(26);PROG2$
1270 PRINT TAB(26);PROG3$
1280 COLOR 6,0:LOCATE 20,1:PRINT PROG4$;
1290 LOCATE 24,1:COLOR 0,7:PRINT" SPACE ";:COLOR 5,0:PRINT" Display on Screen   ";
1300 COLOR 0,7:PRINT" P ";:COLOR 5,0:PRINT" Print on Matrix Printer   ";
1310 COLOR 0,7:PRINT" Q ";:COLOR 5,0:PRINT" Quit Program ";:COLOR 6,0
1320 K$=INKEY$:IF MID$(K$,1,1)="Q" OR MID$(K$,1,1)="q" THEN 1390
1330 IF MID$(K$,1,1)=CHR$(32) OR MID$(K$,1,1)=CHR$(13) THEN OPEN "SCRN:" FOR OUTPUT AS #1:PRINTER=0:GOSUB 1370:GOTO 1450
1340 IF MID$(K$,1,1)="P" OR MID$(K$,1,1)="p" THEN OPEN "LPT1:" FOR OUTPUT AS #1:PRINTER=1:GOSUB 1360:GOTO 1450
1350 GOTO 1320
1360 CLS:LOCATE 23,1:COLOR 6,0:PRINT"WAIT - Printing";:PRINT #1,CHR$(10):RETURN
1370 CLS:COLOR 6,0:LOCATE 1,1:RETURN
1380    REM ?? EXIT
1390 CLS:LOCATE 23,1:COLOR 6,0:PRINT"DONE";CHR$(10):KEY ON:BEEP:END
1400 CLS:LOCATE 24,1:COLOR 6,0:PRINT"WAIT - Loading ";Q$;"MEMU";Q$;:CHAIN"AUTOST.bas",1000:END
1410    REM ?? RETURN
1420 RETURN
1430    REM ?? ERROR
1440 CLS:BEEP:LOCATE 23,1:COLOR 6,0:PRINT"ERROR: ";:KEY ON:ON ERROR GOTO 0
1450    REM ?? START Program
1460 KEY OFF: K=-1: L=0
1470 PRINT #1, SPC(35);"ASCII  CHART";CHR$(10)
1480 PRINT #1,"KEYBOARD:";SPC(1);
1490 FOR J=1 TO 2: START=32:IF J=2 THEN START=160
1500 FOR I=START TO START+94 : K=K+1
1510 IF K=20 THEN K=0:PRINT #1,CHR$(10):PRINT #1,SPC(10);
1520 PRINT #1,SPC(2);CHR$(I);
1530 NEXT:K=-1:PRINT #1,CHR$(10):IF J=1 THEN PRINT #1,"ALTERNATE:";
1540 NEXT
1550 IF PRINTER=1 THEN CLS:LOCATE 20,1:COLOR 6,0:PRINT"DONE":PRINT #1,CHR$(12);
1560 CLOSE #1:END