[Coco] Alternate font sets
Melanie and John Mark Mobley
johnmarkmelanie at gmail.com
Fri Aug 26 23:44:43 EDT 2016
Ron,
The CoCo3 has about 3 fonts already
CoCo 3 BASIC commands:
Width 32
Width 40
Width 80
If in Width 40 or Width 80 mode then
ATTR forgroundColor, BackgroundColor, BlinkOn, UnderlineOn
Ex: ATTR 3,2
Ex: ATTR 3,2,B
Ex: ATTR 3,2,U
Ex: ATTR 3,2,B,U
LOCATE x,y
-------
WIDTH 80
10 REM TEST
20 WIDTH 80
30 PRINT "ABCabc!"
RUN
WIDTH 32
-------
The Width 40 and Width 80 uses two bytes per character.
10 REM PRINT "HI!" THE HARD WAY
15 WIDTH 80
20 X=?
30 POKE X+0, ASC("H")
40 POKE X+1, ATTRVAL
50 POKE X+2, ASC("I")
60 POKE X+3, ATTRVAL
70 POKE X+4, ASC("!")
80 POKE X+5, ATTRVAL
-----
10 REM FIND MEMORY ADDRESS FOR VIDEO RAM TEXT MODE
20 WIDTH 80
30 PRINT "HI!"
40 FOR X=0 TO 32767
50 OK=1
60 IF PEEK(X+0) <> ASC("H") THEN OK=0
70 IF PEEK(X+2) <> ASC("I") THEN OK=0
80 IF PEEK(X+4) <> ASC("!") THEN OK=0
90 IF OK THEN PRINT X; " ";
100 NEXT X
NOTE: This code does not work
Perhaps I should use LPEEK?
-------
10 REM FIND MEMORY ADDRESS FOR VIDEO RAM TEXT MODE
20 WIDTH 80
30 PRINT "ABC"
40 FOR X=0 TO 32767
60 A = PEEK(X+0)
70 B = PEEK(X+2)
80 C = PEEK(X+4)
90 IF (B=A+1) AND (C=B+1) THEN PRINT X; " ";
100 NEXT X
NOTE: This code does not work
Perhaps I should use LPEEK?
John Mark Mobley
More information about the Coco
mailing list