Operator`s manual
The lasi sample program
demonstrai€s
a very
useful capabiliiy
ofthe ATARr
Personal
computer
System-the
display list inierrupt.
perhaps
you
have
been itch-
ing
to have more
than five colors
on the scre€n. with
display lisi interrupts you
can have up to 128
colors. Her€'s
the idea behind it:
the ATARr displav svsiem
u"es
a displd) li"r
and di"plry memory. The
displa) lisr i"
a
*quence
oiinvruc
||on"
rhar rpll rhe '
ompurer whar
Eraphics format ro use in purring
informarion
onlD lhe
scrcpn. rhe display
memory r" rhe
information
So'ng
on{o
rbe s.reFn.
The address
ofthe b€ginning
ofthe display list
can be found inlocations
560 and
561
(decimal).The
address ofthebeginning
ofthe
display memory
can be found
in locaiions
88 and 89
(decimal).
won&ous
things
can be done by changing
the
display list;
this
program
demonstrates onlv
one of the capabilitiea
oa the
di"play Iist "yilem.
lfbir 7 oIa
display lisr insrrud'on
is set
requ;l
ro r,.
rhen rhe
computer will generate
a non-maskable
iirierrupt for
the 6502 when
ir en
counters that
display list instruction.
lf w€ place
an interrupt
routine which
changes the
color values in
the color
registers,
the color or
the screen wjtl
be changed each
tim€ a disptay list inter-
ru_pt is ercountered.
This program
consists
oftwo
parts:
an
initializing
routine
which
sets up
the display list
interrupt vectors,
sets a]l ofthe
display lisi instruc-
tions to g€nerate
display list
inteuupts, and
lastly, enables
the display lisi inter-
rupts. The s€cond
routine
actually seruices
the display list interrupts
by chang-
'ng
rhe color value
in the color
regisrers every
rime it is called.
This rourine is
designed io
operarc in
cRqPHICS 5 mode; iL will
pur
ajl t2B
colors onro
lhe
screen.
rls
rhar
enough for you?r
To see il iD
aflionJ foliow
lhe familiar
pro-
cedure for
Fnlering.
a"sembling,
saving. and loading
rhe
program.
Then
key in
lhe rouowine
BASIC
immediaTe insLruction:
GR. 5: FOR
I= 0 TO
3: COLOR I:
FORJ=20*I TO
20*I+19: PLOT
J,
3:
DRAWTOJ,39:
NEXTJ:
NXXT I:
A=USR(1536)
we
hope that
these four sampl€ programs
have
given
you
a clearer
id€a ofhow
your
ATARI Assembler
Editor
cartridge
might be useful.
Therc
are some more
advanced
techniques
for getting
even
more us€ out
ofyour cartridge.
The irst
proolem
many programmers
encolurrer
arises when
rhey atrempt
to wrjTe
a
program
larger
rhan 256 byieb-long.
Ii will no
longer fir
onio
page
e
and the
pro-
grammer
musr find
a new
place
ro
pur
rhe
program.
The probtem
js
made
worse
Oy the Iact
that lhe Operating
Sysrem
and BASTC u6e
memory
all over the
acldess space.
The programmer
will
have
a hard iime t]ndins
a safe
olace
in
memory where
the machine
langLrage
rourine wju
nor be wip;d
our by
BASIC
or lhe Operaring
Syslem.
There are
a number
ofsolurions
ro rhis oroblim: ach
solurion has
aclvanTage!
and djsadvantages.
we
recommend
lhe followine
aD-
proach.
which
is dimcLrl
ro undersrand
bur i!
also rhe
mosr usefrd and;fe;i
route.
What we
are
going
to do is store
the machin€
language program
inside
a
BASIC program
and then
touch it up
so that it will
run from
;nywhere
in
we
begin by writing
an assembly language progran
with
the Assembler Editor
cartridge. Originate
the
program
near
the top ofyour
available memory. For
ex-
ample. ifyou have
2K ofobject code
and a t6K machine,
o.iginare rhe
program
ai the l2K boLmd€ry wirh
the direclive
=$3000'.
This leaves
4K ofspaci-zr
for your program,
I K
for a CRAPHICS
mode 0 djsplay.
dnd
1K
or extra;pace for
good
measure. Now go
through ihe procedure
ofasspmbling
rhe objecfcode ro
ctjskelle
or casserre. ch€nging
rhe canridges.
and loading The
objefl code into
memory.
Calculate the decimal
ad&esses ofihe
beginniDg and end
ofyour ob-
ject
code. Let
u3 say that
your
program
is 2179
bytes long. It begins
at
g3000
or
p2a8
decimal,
so the last byte is
at 14466. Pdnt PEEK(12288)
and PEEK(14466)
to
verify that these
addresses really
do contain the flrst
and last bytes
ofyou.
pro-
gram.
Remember.
the computer will print
rhe resul"
in decimat, nor
tex-
adecimal. so
you
will
havF ro
(
onven in
your
head
or
wirh
rhe compurer.