Commodore 128 Programmer's Reference Manual page 230

Hide thumbs Also See for 128:
Table of Contents

Advertisement

220
COMMODORE 128
U
The character memory is relocatable as is screen memory. To move standard
character memory in C128 BASIC, alter the lower four bits (nybble) of location 2604
($0A2C). Location 2604 is a shadow register for 53272 for the text screen memory
(upper four bits) and character memory (lower four bits). To move the standard
character memory use the following command:
POKE 2604, (PEEK(2604) AND 240) OR Z.
where Z is a value in Figure 8-9.
VALUE
OFZ
0
2
4
6
8
10
12
14
BITS
xxxxooox
XXXX001X
XXXX010X
XXXX011X
XXXX100X
XXXX101X
XXXX110X
XXXX111X
* = in C64 mode only.
LOCATION OF CHARACTER MEMORY
DECIMAL
0
2048
4096
6144
8192
10240
12288
14336
HEX
$0000-$07FF
$0800-$0FFF
$100O-$17FF
ROM IMAGE in BANK 0 & 2
(default)*
$18OO-$1FF
ROM IMAGE in BANK 0 & 2*
$2000-$27FF
$2800-$2FFF
$3000-$37FF
$3800-$3FFF
Figure 8-9. Character Memory Locations
As with the other graphic system components, character data behaves differently in
bit map mode than in text mode.
Remember, the upper nybble controls where the screen memory maps in, so make
sure not to upset those bits. The AND 240 in the POKE statement above takes care of
preserving the upper four bits.
In C128 mode the character sets are available in all video banks depending on the
value of CHAR ENable
U
u
NOTE: Remember to add an offset of $4000 to the start address of
character memory, for each bank above 0; i.e., for bank 3 add
3*$4000 = $C000
LJ
U

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents