Authors
Publication
Pub Details
Date
Pages
BASIC Terms
Try this for the 2068. This address is used to select the permanent colors for the screen.
It could be useful in your programing. Line 50 sets the screen for white paper and black ink. If this is a 7 you will have the oposite. Anything over 127 will be flashing. If you look more closely you will see that the first 2 lines are with the BRIGHT off. Then the next 2 it is on. The 3rd and 4th are flashing, but the 3rd has the BRIGHT off, and the 4th has it on.
What this boils down to is we can change the current colors that are being printed to the screen. The address: 23693, is like any other byte, that is, 8 bits. The bits are used as follows.
10 FOR n=0 TO 255
20 POKE 23693,n
30 PRINT "*";
40 NEXT n
50 POKE 23693,120
BITS from most significant to least significant:
- 8th: (128) To determine if FLASH is on (1) or off (0).
- 7th: (64) To determine if BRIGHT is on (1) or off (0).
- 6th, 5th, & 4th: (32, 16, 8) Is for the PAPER color.
- 3rd, 2nd, & 1st: (4, 2, 1) Is for the INK color.
To make this easier you just have to remember to:
- Multiply the FLASH (1 or 0) by 128.
- Multiply the BRIGHT (1 or 0) by 64.
- Multiply the PAPER (0–7) by 8.
- Now add these values and add to it the INK (0–7).
For example: If you want PAPER to be green, and INK to be blue, then you would POKE 23693,33. INK=1(blue) PAPER=32(green=4*8) BRIGHT=0(64*0) FLASH=0(128*0). Thus: 0+0+32+1=33. Easy? Well, not at first but it could make it posible to change your colors easily in one fairly short routine. Try this:
10 REM I=INK
20 REM P=PAPER
30 REM F=FLASH
40 REM B=BRIGHT
50 INPUT "INK?";I: IF I>7 THEN GOTO 50
60 INPUT "PAPER?";P: IF P>7 THEN GOTO 60
70 INPUT "FLASH?";F: IF F>1 THEN GOTO 70
80 INPUT "BRIGHT?";B: IF B>1 THEN GOTO 80
90 LET A =(B*128)+(F*64)+(P*8)+I
100 POKE 23693,A
110 PRINT "TESTING",
120 GOTO 50
As you can see, if you set up the 4 variables (B,F,P,& I) it is posible to change the colors that are to be used next by just one or two lines! (line 90 is the key!) Well, HAVE FUN! Let me know if this has helped you any. I would also like to see some one write an article of this type to help us with other little known things such as this.
Products
Media
Image Gallery
Source Code
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.