-
Notifications
You must be signed in to change notification settings - Fork 1
/
petsciiiso.bas
50 lines (50 loc) · 1.25 KB
/
petsciiiso.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
1 REM SHOW PETSCII TABLE SHIFTED & UNSHIFTED & ISO8859-15 ON X16
10 GOTO 370
20 REM MODULO
30 MD%=INT((X/Y-INT(X/Y))*Y+.5):RETURN
40 REM PRINT HEADING AND CHARACTER
50 X=I:Y=16:GOSUB 30
60 IF MD%<>0 THEN GOTO 90
70 IF I<>$20 THEN PRINT:PRINT " ";V$;
80 PRINT:PRINT CHR$(I/16+N);"0";V$;
90 PRINT CHR$(I);" ";
100 RETURN
110 REM DELAY
120 T1=TIME
130 D=60*D/1000
140 IF TIME-T1<D THEN GOTO 140
150 RETURN
160 REM WAIT 1 S
170 D=1000:GOSUB 120
190 RETURN
200 REM PRINT TABLE
210 N=ASC("0")
230 PRINT:PRINT:PRINT " ";V$;
240 FOR I=ASC("0") TO ASC("9"):PRINT CHR$(I);" ";:NEXT
250 FOR I=ASC("A") TO ASC("F"):PRINT CHR$(I);" ";:NEXT
260 PRINT:PRINT B$;B$;P$;:FOR I=1 TO 31:PRINT B$;:NEXT
270 FOR I=$20 TO $7F
280 GOSUB 50
290 NEXT
300 N=ASC("7")
310 FOR I=$A0 TO $FF
320 GOSUB 50
330 NEXT
350 RETURN
360 REM MAIN
370 SCREEN $FF
380 PRINT CHR$($93);
385 REM LOOP
390 PRINT CHR$($13);CHR$($8F);CHR$($0E):PRINT "PETSCII (SHIFTED)"
395 B$=CHR$($C0):V$=CHR$($DD):P$=CHR$($DB)
400 GOSUB 210
405 GOSUB 170
410 PRINT CHR$($13);CHR$($8F);CHR$($8E):PRINT "PETSCII (UNSHIFTED)"
415 B$=CHR$($C0):V$=CHR$($DD):P$=CHR$($DB)
420 GOSUB 210
425 GOSUB 170
430 PRINT CHR$($13);CHR$($0F):PRINT "ISO8859-15 (SHIFTED)"
435 B$="-":V$=CHR$($7C):P$="+"
440 GOSUB 210
450 GOSUB 170
460 GOTO 390