Okay stealing text from the Apple Monitor unpeeled:
$31 MODE
- This byte is used by the Monitor command processing routines to control parsing and to control operations when a blank is encountered after the hex digits. For example, a hex address followed by a colon causes setting of MODE
so that during further processing of the input line each blank encountered signifies end of a hex value to be placed in memory. During parsing, the contents of MODE
indicate where the hex values should be stored for use when the command itself is encountered. MODE
is set to appropriate values by plus, minus, colon, and period.
$3C A1L
- Multipurpose Monitor work area:
$3D A1H
- May be clobbered by Instruction Trace in Old Monitor; see XQT
above.
When the Monitor begins processing a command, MODE is initiailized to zero. As the input line scanned, hex digits are first place into A2L,H
. From there they are moved also to A1L,H
and A3L,H
as long MODE
remains zero. When a plus, minus, colon or period is encountered, MODE
is modified to indicate which, and A1L,H
will continue to contain the value, terminated by the operator encountered.
A1L,H
is the primary index for the BLANK monitor command, memory examine or display.
A1L,H
contains the addend for the Monitor ADD command.
A1L,H
contains the minuend for the Monitor
SUBTRACT command.
A1L,H
is the source field pointer during the
Monitor MOVE command.
A1L,H
is one of the two indices used in the
Monitor VERIFY command.
A1L.H
is the source field from which PCL.H
is set on L and G Monitor commands, and the Old Monitor commands S and T, if an address is specified. If no address is used in the input line, then PCL.H
is the residue of the last command which maintained or used it.
A1L,H
is the memory pointer used for cassette tape
READ and WRITE Monitor operations.
Monitor routine NXTA1
increments A1L,H
by one and
then compares the result to A2L,H
. If A2L.H
is
less than A1H,L
, then Carry is set when control is
returned to the calling program.
$3E A2L
- Multipurpose Monitor work area:
$3F A2H
- May be clobbered by Instruction Trace in Old Monitor; see XQT
above.
This field is the receiving field into which hex data is stored during Monitor Command parsing. When the command itself is encountered, A2L,H
contains the last parameter entered. While MODE
contains zero (until a plus,minus, colon or period is encountered) A2L,H
is continually copied into A1L,H
and A3L,H
. If a "less than" sign is encountered, A2L,H
is immediately copied to A4L,H
and A5L,H
A2L,H
is used to terminate examine (memory display), tape write, tape read, memory move, and memory verify operations.
A2L,H
contains the subtrahend in a Monitor
SUBTRACT command operation.
A2L,H
contains the augend in a Monitor ADD command
operation.
A2L,H
is the source field and A3L,H
is maintained
as the pointer for the Monitor STORE command.
A2L,H
contains the port number in an input port select or output port select (control K or P) command.
Monitor routine NXTA1
increments A1L,H
by one and
then compares the result to A2L,1I
. If A2L,H
is
less than AIL,H
then Carry is set when control is
returned to the calling program.
$40 A3L
- Multipurpose Monitor work area:
$41 A3H
- May be clobbered by Instruction Trace in Old Monitor; see XQT
above.
A1L,H
and A3L,H
are both filled from A2L,H
during Monitor Command processing scan of the input line as described above regarding A1L,H
.
A3L,H
is used as the destination pointer during
Monitor STORE command processing.
A3L,H
is used as a work area by the Register Display routine, which is called by the control-E Monitor command, or as part of the single cycle or trace operations of the Old Monitor.
$42 A4L
- Multipurpose Monitor work area:
$43 A4H
- May be clobbered by Instruction Trace in Old Monitor; see XQT
above.
This field (and A5L,H
) are loaded from A2L,H
during Monitor Command Processor scan of the input area when a "<" character is encountered.
A4L,H
is the receiving field pointer during a Monitor MOVE command execution.
A4L,H
is the second field pointer during a Monitor VERIFY operation.
Monitor routine NXTA4
increments A4L,H
by one, and then drops into NXTA1
, which increments A1L,H
by one and then compares the result to A2L,H
. If A2L,H
is less than A1L,H
then Carry is set when control is returned to the calling program.
$42 A5L
- Multipurpose Monitor work area:
$43 A5H
- This field is not within the bounds of the area of XQT
, which, in the Old Monitor overlays A1L through A4H.
Note A5H = $45 = ACC
This field is filled from A2L,H
as described above for A4L,H
. However the field is not otherwise referenced within the monitor, except that ACC
(below) is also A5H
.