[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]

As a further example, you can modify the sine curve program to display a semicircle. Here are the lines to type to make the changes:

 50 FORX=0TO160:REM DO HALF THE SCREEN
 55 Y1=100+SQR(160*X-X*X)
 56 Y2=100-SQR(160*X-X*X)
 60 FORY=Y1TOY2STEPY1-Y2
 70 CH=INT(X/()
 80 RO=INT(Y/X)
 85 LNYAND7
 90 BY=BASE+RO*320+8*CH+LN
 100 BI=7-(XAND7)
 110 POKEBY,PEEK(BY)OR(2^BI)
 114 NEXT
This will create a semicircle in the HI-RES area of the screen.

WARNING: BASIC variables can overlay your high-resolution screen. If you need more memory space you must move the bottom of BASIC above the high-resolution screen area. Or, you must move your high-resolution screen area. This problem will NOT occur in machine language. It ONLY happens when you're writing programs in BASIC.

MULTI-COLOR BIT MAP MODE

Like multi-color mode characters, multi-color bit map mode allows you to display up to four different colors in each 8 by 8 section of bit map. And as in multi-character mode, there is a sacrifice of horizontal resolution (from 320 dots to 160 dots).

Multi-color bit map mode uses an 8K section of memory for the bit map. You select your colors for multi-color bit map mode from (1) the background color register 0, (the screen background color), (2) the video matrix (the upper 4 bits give one possible color, the lower 4 bits an- other), and (3) color memory.

Multi-color bit mapped mode is turned ON by setting bit 5 of 53265 ($D011) and bit 4 at location 53270 ($D016) to a 1. The following POKE does this:

   POKE 53265,PEEK(53625)OR 32: POKE 53270,PEEK(53270)OR 16

[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]
This page has been created by Sami Rautiainen.
Read the small print. Last updated May 12, 2002.