text
stringlengths
0
99.6k
However, there are several commands in
CBM BASIC that are rarely used by
programmers, and virtually no commands
for creating high-resolution graphics.
Wouldn't it be nice if we could
replace those unused commands with
some that would let us easily use the
hi-res screen, without all those peeks
and pokes?
Since we can't change the BASIC ROM,
we must first "copy" it into RAM. RAM
can be changed easily; this is what
you're doing when you POKE a number
into a memory location. If we copy
ROM into RAM, change the appropriate
routines, and then tell the '64 to use
the new instructions in RAM instead of
ROM, we can change those unused to
commands to do almost anything we
like!
BASMOD does just that. After copying
ROM into RAM (lines 30-34), it
replaces the following BASIC commands:
LET becomes HUE;
WAIT becomes PLOT;
CONT becomes WIPE; and
VERIFY becomes SCREEN.
USING BASMOD
------------
Here's how to use the new commands:
SCREEN
------
SCREEN is used to switch between the
normal text screen (beginning at
memory location 1024) and a
high-resolution screen (beginning at
8192). The contents of one screen
will not affect the other; you can
even draw on the hi-res screen while
looking at the text screen!
The syntax is:
SCREEN0 selects the text screen;
SCREEN1 selects the hi-res screen.
HUE
---
HUE selects the colors to be used on
your hi-res screen; it does not change
the text screen colors. HUE should be
used before SCREEN or WIPE.
The syntax is:
HUE colr,bkgd
where "colr" is a number from 0 to 15,
corresponding to the desired color of
the points plotted on the screen, and
"bkgd", also between 0 and 15, is the
background color. (See page 61 of
your User's Guide for the numbers to
use here). If you change HUE after
PLOTting points on the screen, the
color of those points will change too.
WIPE
----
WIPE clears your hi-resolution screen.
You should use WIPE before starting to
draw with PLOT.
The syntax is:
WIPE
PLOT
----
Now that you've selected your HUEs,
WIPEd, and selected the hi-res SCREEN,
here's where the fun starts!
Your hi-res screen is made up of 64000
points. You can turn each of these
points "on" or "off"; turning it "on"
means that point will be the plot
color you've selected with HUE,
instead of the background color.
To make it easy to find each point,
each of them has two "coordinates",
corresponding to its horizontal (X)