Operator`s manual

show horv
to execute some
of the most commonly
used funclions.
These
programs
are meant
only for
demonstration purposesr
rhey certain)y
do nor
exercise ihe full power
ofthe
machine. You may \' ish
to entranc
them, adding
whatever features you
desirc. In
this rvay
you
will leam
mor about
the ATARI
Personal Computer
System.
All four programs
have
been written
to
.eside
on
page
6
ofmemory. These 256
bytes have
been reserved for your
use. On page zero,
oriy 7 bles have
been
reserved for your
use by rhe BASIC
carrridge; they
are locaLions
gCB
throush
$Dl
r203
rhro'ugh
209r. L;carions
$Dl and $D; r2l2 ;nd 2 t3rare
also usable;rh;y
ate Lrsed ro rerurn paramereN
from
machine language roulines
ro BASTC
though the
USR function. Flrthermore,
locations
gD6
through
gF1
are used
only
by ihe floating
point
package; you
may use them from
BASIC USR calls if
you
do not
mind having ihem
altered every time an
arithmetic operation is
peformed.
fyour program
runs
only
with
the Assemblex Editor
cartridg and
not the BASIC
cartridge
you
may us
zro
page
locations
gBo
through
gCF. you
will
have to be very sparing
in
your
use
of
page
zero locations,
as
nine
safe
locations will
not take you
far. It is not wise
to usurp other locations
on
page
zro,
as they are usd
by the operating system
and SASIC; there is no way
to
know
ifyou therby sabotage
some vital function
and clash the system untit it
is
too late. For the moment, we
recommend that you
limit
yoursfto
programs
that fit onto
page
6
and use less than I byis
of
page
zero. The four sample
programs
meet that restriction;
later we will
show
you
how to make larger
programs
with
BASIC.
Our fiIst sample program
is vry simpls it
takes two 16-bit numbers, exclusive
OR's them iogether,
and returns the resulting
16-bit number to BASIC. lt is
only
17 bles long and
use6 oriy 4 bytes ofpage zero. we will
us it as a vehicle to
show
you
the rudiments
ofintefacing machine language
to BASIC. Here's how:
First,
t}?e in the program
with the Assembler Editor
cartridge in
place.
Make
sure that
you
have
typed it in
properly
by
assembling th
program
(the
command ASM) and verifying
that no ellors are flagged
to
you.
If it squawks
unpleasantly,
you
have
offended its delicat sersitivities; note
the line number
where
the erlor occuffed
(CONTROL-1
is a handy way to stop
the listing so
you
can see what
happend). Then list
the offending line and corect
the typo.
you
may rst
assured that ih
program
as
we
list ii r^/ ill indeed assemble without
effors; i{ you
t}?e it in exactly
as
listed
it will work fine. Now
assemble the
progran
with
th object code
going
to
your
nonvolatile storage medium
(either
diskette or
cas6ette). If
you
have a
disk drive, type in:
ASM,J/D:EXCLOR.OBJ
Ifyou have a Program
Recorder, type in:
ASM,.rC:
Follow normal procedures
for
using these devices. After the
object code is
stored to
your
diskette or casseti,
open the ca ridge slot mver
and
replace
the
Assembler Editor
cartridge w iih the BASIC
caltridge. Close the covr
andwhen
you
see the READY prompir
load the
program
from
diskette orcassett tape into
RAM.
lfyou
have a diskeite. rype
DOS to call DOS. then
lwe
L
ro load a binary file.
when ir
a6ks
what
file ro load. respond
with:
ExcLoR.oBJ
mi@