Commodore 128 Programmer's Reference Manual page 259

Hide thumbs Also See for 128:
Table of Contents

Advertisement

THE POWER BEHIND COMMODORE 128 GRAPHICS
249
I t
i
)
; i
i!
it
1.
First start in C128 mode, and enter split screen (multi-color) bit map
mode through BASIC with this command:
GRAPHIC 4,1
2.
Now draw on the screen with the BOX, CIRCLE, DRAW and PAINT
commands either in a program or in direct mode.
3.
When you are finished drawing, enter the machine language monitor either by
pressing the F8 function key or by typing the MONITOR command.
4.
Now transfer the video matrix and bit map from the C128 default locations of
$1COO through $1FFF and $2000 through $3FFF respectively, to $5C00 through
$5FFF and $6000 through $7FFF respectively. The new start addresses are
the default locations plus an offset of $4000 for both the video matrix and bit
map pointers. The new start of the video matrix is at $5C00 ($lC00 +
$4000). The new bit map begins at address $6000 ($2000+ $4000). This
transfer can be accomplished with a single transfer command within the
machine language monitor as follows:
T 1C00 3FFF 5C00
This command transfers the contents of memory locations $lC00 through $3FFF
to $5C00 through $7FFF. Since the default locations of the video matrix and bit map are
continuous in memory, the transfer can be done with a single command. If the default
addresses of the video matrix and bit map had not been contiguous, two transfers would
have been necessary. See Chapter 6 for details on using the Machine Language Monitor.
Now that you are still within the control of the Machine Language Monitor, begin
entering the machine language instructions in the listing provided in the next few pages.
Start entering the program at address $0C0Q. The program, including the scrolled data
occupies memory up to address $0DF9, which means the program is a total of 505 bytes,
or almost half a kilobyte (K).
Now save the program you just painstakingly entered with the Monitor Save (S)
command as follows:
S "filename", 08, 0C00, 0DFF
If you have a C128 assembler, create a source file, assemble and load it. If your
assembler allows it, save the program as a binary file.
NOTE: If you have the Commodore 64 Assembler Development System,
create a source file (with start address $0C00), assemble and load it in
C64 mode. Then press the RESET button (not the ON/OFF switch) to enter
C128 mode. Don't worry, your program will still be in memory, but this
time it's in C128 memory. Next enter the Machine Language Monitor
and use the Monitor Save (S) command to make a binary file as described
above.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents