Operating instructions

After the load,
we
execute the
RTS
in the tape loader routine. Since
we
did
not jump
to
it as a subroutine for the
load of the last segment, all
it
does is to
pull 0200
off
the stack and uses this as
the location of the next instruction
to
ex-
ecute.
Therefore by loading those initial
16
bytes in the
first
program described,
we
cause the machine
to
load program 1
which began automatically
to
load in
turn programs
2,
3,
and
4.
Then it began
the execution
of
our loaded segmented
program at location
0200.
The only cautionary note in using
this
type
of
sequenced loading is
to
be
certain
that
the load control segment is
located in the area
of
memory which is
overlayed last by the final program seg-
ment to
be
loaded
(04
in
this
case).
Otherwise you will erase the loader
before the entire group of segments
is
brought in.
The
16-byte
setup program you will
note is fully relocatable, and could even-
tually
be
linked as a part
of
your monitor
routines. However to make
it
more
general in
that
case, the instructions
Figure
1:
The Bootstrap Program
(Load and
start
Segment Loader)
now specified at 0208 could
be,
for
ex-
ample,
A5
EE,
or reference any other
zero page location so that the
10
byte
could
be
preloaded there by the user and
retrieved by this routine for use later.
This also assumes
that
the user has
committed this routine to
ROM.
This sequenced loading technique
has other uses as well, but that is
another subject and may be the subject
of
a future article.
0200
20
86
88
JSR
ACCESS
;UNPROTECT
SYSTEM
RAM
0203
A9
00
LDA
#$00
:STACK
LO
BYTE
OF
0205
48
PHA
;PROGRAM
01
START
ADDR.
0206
A9
02
LDA
,11$02
,STACK
HI
BYTE
OF
0208
48
PHA
; PROGRA
~
01
START
ADOR.
0209
AO
00
LDY
1$
00
:T
APE
MODE
(
80
IF
HI
spo.
)
0208
A9
01
LOA
.1ISOl
:PROGRAM
10
SE ARCHED
0200
4C
78
8e
JMP
LOADT
:LDAD
PHDGRAM
01.
Figure 2: The Segment Loader Program:
Loads segments 02, 03. ]4 then
starts
execution
at
location 0200.
0200
20
~6
fB
JSR
ACCESS ;
UtoolPROTECT
SYS
TEM
R.AM
0203
A9
00
LDA
#$00
;STACK
LO
BYTE
OF
PRCGRJlM
0205
48
PHA
;START
ADDRESS
0206
A9
02
LDA
#$02
;STACK
t
..
n
BYTE
OF
PRCGRJM
0208
48
PHA
;S
TART
ADDRESS
0209
AO
00
LDY
#$00
;KIM
MODE:
(80
FOR
HI
SPC.
J
0208
A9
02
LOA
#S02
;PROGRA1lI
10
02
020D
20
78
EC
JSR
LOADT
:JSR
TO
TAPE
LOAD SUEROUT I
NE
0210
AD
00
LOY
#$
00
,TAPE
MCDE
0212
A9
03
LOA
#$03
;IO
03
0214
20
78
BC
JSR
LOADT
;
JSR
TO
TAPE
LOAD
0217
AO
00
LOY
#SOO
;T
APE
MODE
0219
A9
04
LOA
#$04
aD
04
021B
4C
78
8e
JMP
LOADT
:T
APE L
CAD
*JUMP
*
t
BEG
INS
;
PROGRA~
AT
0200
'III
HEN
LOAD
DONE.
r
'"'"
Missing MICRO Information?
MICRO is devoted exclusively
to
the 6502.
In
addi-
tion, it is aimed at useful, reference type material,
not
just
"fun
and games". Each month MICRO
publishes application notes, hardware and soft-
ware tutorials, a continuing bibliography, soft-
ware catalog, and so forth. Since MICRO contains
lots
of
reference material and many useful pro-
grams, most readers want
to
get the entire collec-
tion
of
MICRO. MICRO grew very rapidly, and it
very quickly became impracticle to reprint back
issues for new subscribers.
In
order
to
make the
older material available, two collections
ot
reprints have been published.
A limited number
of
back issues are
still
available
for number 7 through current.
The
BEST
of
MICRO Volume 1 contains all of the
significant material from the first six issues
of
MICRO, covering October/November 1977 through
August/September 1978. This
book.
form is 176
pages long, plus five removeable reference cards.
The material is organized by microcomputer and
almost every article is included. Only the ads have
been omitted. Surface
$7.00
Air
Mail $10.00
The BEST
of
MICRO Volume 2 covers the second
six issues, from October/November 1978 through
May
1979. Organized by microcomputer, this
volume is
224 pages. Surface $9.00
Air Mail $13.00
Use the convenient Order Form on Page
23
to
place your order.