1.2.3 J command
Function
Operation
9
Transfers system control
to
the specified address,
that
is, loads
the
specified ad-
dress in the program counter
of
the
CPU.
When a J command is entered, the display
is
as shown in FIGURE 1.12.
FIGURE 1.12
At this time,
the
monitor program requests the operator
to
enter the address
to
which system control
is
to be transferred.
Enter
a 4-digit hexadecimal address
from
the
keyboard and press the [
CR
) key. System control
is
then transferred
to
the machine language program starting at the specified address.
This command
is
used to invoke a machine language program. Before executing a
machine language program, carefully check
the
program. Careless execution
of
a
machine language program may result in a serious error.t This command
is
also
used
to
restart
the
BASIC interpreter
or
other system program
if
it has
not
been
destroyed. There are two methods
of
restarting the system program: warm start
and cold start. With a warm start, previous system data (that is, data which was
stored in the system work area at the end
of
the last execution
of
the system pro-
gram) are
not
erased. With a cold start, previous system data are ignored just
as
during an initial start with the IPL. The start addresses
of
the BASIC interpreter
are
as
follows:
Warm
start address= $1280
Cold start address = $1220
t The hardware
will
not be damaged, but a
ftle
protected tape may be overwritten with something
else
or the pro·
gram in
RAM
may
be
destroyed.
The
RST 7 instruction (OBJ Code: $FF)
is
used to stop machine language program execution.
When
the
RST
7
instruction
is
encountered, system control
is
transferred to the monitor program to wait for the next command.
At the
same
time, the contents
of
registers AF,
BC,
DE,
HL
and
P~
are displayed on the CRT screen in sequence
in
4 digit hexadecimal notation. The
PC
register contains the address where the RST 7 instruction
is
stored.
It
is
recommended that RST 7 instructions be placed in appropriate program locations for
ease
of
debugging. To
continue program execution, execute the J command. (The contents
of
the
PC
register which were pushed
to
the
stack
by
the RST 7 instruction
have
been popped from the stack by the break routine. Therefore, no RET instruc-
tion can be executed.)