I was especially intrigued because I used the same technique when programming in DOS
to do Application Title screens. When I first found it I found the code Impossible to Understand.
I still find the author's implementation difficult to follow but it works and I'm not a Judge.....LOL.
I've finally figured out how to do it in my Own code. The following code only does it for a single letter
at this time....... But I'm going to expand it to a String and do some speed optimizations.
With all due modesty I think my code is a little more readable. Not as fancy yet though but
the core function is the same
SO HERE'S THE CODE
Code: Select all
10 X=25:Y=20
15 CLS:PRINT:PRINT:PRINT
20 INPUT "ENTER A LETTER ";X$
25 CLS
30 CC=ASC(X$)
40 GOSUB 10500
55 GOSUB 10600
60 PRINT:PRINT:PRINT:END
REM READ IN A CHARACTER MAP CC
10500 CA = $C000 + 8*(CC-64)
10505 GOSUB 10900
10510 RB=6:GOSUB 10950
10520 FOR I = 0 TO 7
10525 CM(I+1) = PEEK(CA+I)
10526 CM$(I+1) = ""
10530 NEXT I
10535 GOSUB 10920 : REM RESTORE ROM BANK
10540 FOR I = 1 TO 8
10541 RESTORE 11100
10545 FOR CT = 1 TO 8
10550 READ CP
10551 T = CP AND CM(I)
10555 IF T<> 0 THEN CM$(I)=CM$(I)+CHR$(CC):GOTO 10562
10560 CM$(I)=CM$(I)+CHR$(32)
10562 SLEEP 0
10565 NEXT CT
10570 NEXT I
10575 RETURN
10600 FOR I = 0 TO 7
10605 LOCATE Y+I, X
10610 PRINT CM$(I+1);
10615 NEXT I
10620 RETURN
REM SAVE CURRENT ROM BANK
10900 RS = PEEK($0001)
10905 RETURN
REM RESTORE SAVED ROM BANK
10920 BANK PEEK(0),RS
10925 RETURN
REM SET ROM BANK TO RB
10950 BANK PEEK(0), RB
10955 RETURN
11000 DIM CM(8)
11010 DIM CM$(8)
11015 RETURN
11100 DATA %10000000,%01000000,%00100000,%00010000,%00001000,%00000100
11110 DATA %00000010,%00000001,%00000000