10 '==== PCG Patern Test
100 DEFINT A-Z
110 WIDTH 40,25
120 DIM CC(3,7)
130 GOSUB 10000 :' CG Data Read Sub.
150 INPUT "1:1byte, 2:1char, 3:ROM->PCG 4:Print PCG";S
160 ON S GOTO 200,300,400,500
170 GOTO 150
200 '---
210 INPUT "PCG-Adr(0-1023)";AD
220 input "Data(8bit)";CD
230 GOSUB 1010
240 GOTO 150
300 '---
310 INPUT "Char Code(0-127)";CG
320 INPUT "CG Data(0-3)";CP
330 GOSUB 1210
340 GOTO 150
400 '---
410 INPUT "Copy Char Code(0-127)";CG
420 IF CG<0 OR CG>127 THEN 450
430 GOSUB 1510
440 GOTO 150
450 FOR CG=0 TO 127
460 GOSUB 1510
470 NEXT
480 GOTO 150
500 '---
510 PRINT
520 GOSUB 2000: PRINT
530 GOTO 150
1000 '--- 1 Byte send to PGC Sub.(CD->AD)
1010 OUT 0,CB
1020 '
1030 AL = AD AND &HFF
1040 AH = (AD/256) OR MS
1050 OUT 1,AL
1060 OUT 2,AH
1070 AH = AH AND &HCF
1080 OUT 2,AH
1090 RETURN
1200 '--- 1 Char Data send PCG Sub.
1210 A = CG*8
1220 MS = &H10
1230 FOR I=0 TO 7
1240 CB = CC(CP,I)
1250 AD = A+I
1260 GOSUB 1010
1270 NEXT
1280 RETURN
1500 '--- Copy CG-data to PCG
1510 A = CG*8
1520 MS = &H30
1530 FOR I=0 TO 7
1540 AD = A+I
1550 GOSUB 1030
1560 NEXT
1570 RETURN
|
2000 '-- Print Graphic Char Sub.
2010 FOR J=0 TO 7
2020 FOR I=0 TO 15
2030 PRINT CHR$(128+J*16+I);
2040 NEXT I
2050 PRINT
2060 NEXT J
2070 RETURN
10000 '--- CG Data Read Sub.
10010 RESTORE 10110
10020 FOR J=0 TO 3
10030 FOR I=0 TO 7
10040 READ CC(J,I)
10050 NEXT I
10060 NEXT J
10070 PRINT
10080 RETURN
10100 '--- CG Data
10110 DATA &HFE :'11111110b
10120 DATA &H28 :'00101000b
10130 DATA &H28 :'00101000b
10140 DATA &H48 :'01001000b
10150 DATA &H48 :'01001000b
10160 DATA &H8A :'10001010b
10170 DATA &H84 :'10000100b
10180 DATA &H00 :'00000000b
10200 '
10210 DATA &H0C :'00001100b
10220 DATA &H12 :'00010010b
10230 DATA &H22 :'00100010b
10240 DATA &H24 :'00100100b
10250 DATA &H58 :'01011000b
10260 DATA &H40 :'01000000b
10270 DATA &H80 :'10000000b
10280 DATA &H00 :'00000000b
10300 '
10310 DATA &H00 :'00000000b
10320 DATA &H00 :'00000000b
10330 DATA &H3A :'00111010b
10340 DATA &H44 :'01000100b
10350 DATA &H84 :'10000100b
10360 DATA &H8A :'10001010b
10370 DATA &H72 :'01110010b
10380 DATA &H00 :'00000000b
10400 '
10410 DATA &HFC :'11111100b
10420 DATA &H42 :'01000010b
10430 DATA &H20 :'00100000b
10440 DATA &H10 :'00010000b
10450 DATA &H20 :'00100000b
10460 DATA &H42 :'01000010b
10470 DATA &HFC :'11111100b
10480 DATA &H00 :'00000000b
|