An
assembly language program can be loaded into
PET
memory by
POKEing the decimal values of the
6502
instructions that make
up
the pro-
gram. There
is
no
area set aside for use by assembly language programs. Vou
have to make space, either by taking otherwise unused;system locations
or
by setting
up
a space
in
the user program area of memory. The following are
possible locations:
1.
Cassette Buffers. If vou
do
not
have a second cassette unit. then the
192-byte tape buffer for cassette
#2
can
be
used to store an assembly
language program. The buffer
#2
extents are locations 826 to 1017
(see
Table 6-2). In addition. if the console cassette
unit
is
not
going to
be
used
while
the assembly language program
is
operating. then the other
192-byte tape buffer for cassette
#1.
at memory locations 634-825.
is
also available. No LOADs. SAVEs or other tape 1/0 can
be
performed to
the particular cassette
while
the cassette buffer
is
used by an assembly
language program.
2.
Top of Memory. Memory locations 52 and 53 contain the pointer to the
top of memory. On
8K
PETs
this value
is
8192. You can temporarily set
the top of memory pointer to a lower address. thereby reserving a num-
ber of bytes from the new pointer value to the actual top of memory for
storage of
an
assembly language program. To set the pointer. say.
down
1000 bytes. vou
will
need to store the value 7192 (8192-1000) con-
verted into low. high address order. e.g.:
High
Low
71921O=1C1816-
1C16=281O and
1816=2410
So
24
is
to
be
stored at location 52 (Iow byte). and 28
is
to
be
stored at loca-
tion 53 (high byte). the
following
instructions can be used:
10 AL=PEEK(52);AH=PEEK(53):REM SAVE
CURRENT
POINTER
20
POKE
52.24:POKE 53.28:
REM
TOP
OF
CORE
= 7192
100
POKE
52.AL:POKE 53.AH:REM
RESTORE
POINTER
110
END
3.
You may find usable locations in the BASIC StatementArea. You may
create a block of
dummy
DATA statements and use those locations.
There are generally a few locations free between the end of the program
and the beginning of the Variable Area.
Vou must be very careful
when trying these types of approaches
that
your assembly language
program and the
PET
BASIC interpreter do
not
get in each other's way.
330