BIT PAIR | COLOR REGISTER | LOCATION |
---|---|---|
00 | Background #0 color (screen color) | 53281 ($D021) |
01 | Background #l color | 53282 ($D022) |
10 | Background #2 color | 53283 ($D023) |
11 | Color specified by the lower 3 bits in color memory | color RAM |
Type NEW and then type this demonstration program:
100 POKE 53281,1: REM SET BACKGROUND COLOR #0 TO WHITE 110 POKE 53282,3: REM SET BACKGROUND COLOR #1 TO CYAN 120 POKE 53282,8: REM SET BACKGROUND COLOR #2 TO ORANGE 130 POKE 53270,PEEK(53270)OR16: REM TURN ON MULTICOLOR MODE 140 C=13*4096+8*256: REM SET C TO POINT TO COLOR MEMORY 150 PRINTCHR$(147)"AAAAAAAAAA" 160 FORL=0TO9 170 POKEC+L,8: REM USE MULTI BLACK 180 NEXT
The screen color is white, the character color is black, one color register is cyan (greenish blue), the other is orange. You're not really putting color codes in the space for character color, you're actually using references to the registers associated with those colors. This conserves memory, since 2 bits can be used to pick 16 colors (background) or 8 colors (character). This also makes some neat tricks possible. Simply changing one of the indirect registers will change every dot drawn in that color. Therefore everything drawn in the screen and background
This page has been created by Sami Rautiainen. | |
Read the small print. | Last updated May 12, 2002. |