
As a further example, you can modify the sine curve program to dis-
playa semicircle. Here are the lines to type to make the changes:
50 FORX=0T0160:REM DO HALF THE SCREEN
55 'T' 1 '" 1 iZII21+SC!F: ( 161?!,jo::x:-:;<::t.;:.::)
56 Y2=100-SQR(160:t.X-X*X)
60 FORY=Y1TOY2STEPY1-Y2
7121 CH= nn (:x:/:::)
80 RO=U-ITCT'/8)
85 .U'I='T'AND7
90 BY=BASE+RO*320+S:t.CH+LN
10tC1 E:I=7-C<:At'1Dn
1 H3 POKEB'T'., PEEK (B'T') OR (2 'T'BI )
114 ~IEXT
This will create a semicircle in the
HI-RES area of the screen.
WARNING: BASIC variables can overlay your high-resolutionscreen. If you need
more memory space you must move thebottomof BASIC above the high-resolution
screen area. Or, you must move your high-resolutionscreen area. This problem will
NOT occur in machine language. ItONLY happens when you're writing programs
in
BASIC.
MULTI-COLORBIT 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 resolu-
tion (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
PROGRAMMING GRAPHICS 127
Komentáře k této Příručce