268
Apple
lie
Users
Handbook
Once
you
have started
the
program,
you
can stop
it
by pressing
Ctrl-Reset.
This
program
causes
the
speaker
to
buzz. This
is
accomplished
using
the
monitor
bell
subroutine
. This
is
located at
memory
address FBDD. The second
instruction
(JMP
300)
causes
the
pro-
gram
to
repeatedly
jump
to
the
bell
subroutine
. This results
in
a
continuous
buzzing
being
emitted
from
the
speaker.
The various
1/0
subroutines
are listed
in
Appendix
I. These can
be
executed
via a
machine
language
program.
Creating a Custom
Monitor
Command
The
monitor
's CTRL-Y
command
causes
program
control
to
be
transferred
to
the
instruction
at
memory
location
3F8.
Addresses
3F8-3FF
are available
for
usage by
the
programmer.
Generally
,
because
only
8 bytes are available, a JMP
instruction
will
be
stored at these addresses.
However
, a
machine
language
pro-
gram
could
also be stored
there.
One
useful
application
of
the
CTRL-Y
command
is
automatic
execution
of
the
mini-assembler
.
By
storing
the
following
data
values at locations 3F8-3FA:
JMP
I
3F8:
4C
' Address
F666
,.
,....,
'
66
F6
CTRL-Y
will
result
in
automatic
execution
of
the
mini-assembler
.
The
programmer
could
avoid having
to
enter
the
preceding
command
by
adding
the
following
program
line
to
the
DOS
"Hello"
file. This can be accomplished
by
entering
the
following:
]UNLOCK
HELLO
]LOAD
HELLO
]5
POKE 1016,
76
: POKE 1017,102:POKE 1018,246
]SAVE HELLO
]LOCK
HELLO