THE CHARACTER SET
The data for the regular Atari character set is stored in locations 57344 through 58367 ($E000 to $E3FF). There are eight bytes for each character and 128 characters in all (for a grand total of 1024 bytes). But wait a minute. Doesn't the Atari have 256 characters? Yes, but the information for the regular characters is all the Atari needs to know to print inverse characters, so that's why there are only 128 character descriptions.
For lots of information on how the bytes are used to describe a character, and on the order of the characters within the character set, see CHBAS at location 756. For information on how to design your own character set, see the Appendix One, which is on that very topic.
The following program will use the character descriptions to put text on the screen in graphics mode eight:
100 GRAPHICS 8
110 DIM TEXT$(120)
120 PRINT "Start text in what column (0-39)";
130 INPUT COL
140 PRINT "In what row (0-152)";
150 INPUT ROW
160 PRINT "Type in the text you want to print:"
170 INPUT TEXT$
190 FOR CHAR=1 TO LEN(TEXT$)
230 FOR BYTE=CHSET+INTRNL*8 TO CHSET+INTRNL*8+7
240 POKE SCRMEM+ROW*40+COL,ABS(255*(ATASC>127)-PEEK(BYTE))
260 NEXT BYTE
290 IF COL=40 THEN COL=0:ROW=ROW+8
300 NEXT CHAR
320 GOTO 120
Return to Table of Contents | Previous Chapter | Next Chapter