Personal Computer User Manual

Using the 197Bug Debugger
4-4 Installation Guide
4
Address as a Parameter
Many commands use ADDR as a parameter. The syntax accepted by 197Bug is
similar to the one accepted by the one-line assembler. All control addressing
modes are allowed. An “address + offset register” mode is also provided.
Address Formats
Addresses are entered as a hexadecimal number, e.g., 20000 would correspond
to address $00020000. The address, or starting address of a range, can be
qualified by a suffix of the form ^S, ^s, ^U, or ^u, where S or s defines
Supervisor address space, and U or u defines user address space. The default,
when the qualifier is not specified, is Supervisor.
Once a qualifier has been entered, it remains valid for all addresses entered for
that command sequence, until the 197Bug is re-entered or another qualifier is
provided.
An alternate form of Address is Rnn, which tells the bug to use the address
contained in CPU Register Rnn, where nn=00 through 31 (i.e., 00, 01, ..., or 31).
Hence ADDR:= Hex Number{[^S]|[^s]|[^U]|[^u]} | Rnn
Note
In commands with RANGE specified as ADDR DEL ADDR,
and with size option H or W chosen, data at the second
(ending) address is acted on only if the second address is a
proper boundary for a half-word or word, respectively.
Otherwise, the range is truncated so that the last byte acted
upon is at an address that is a proper boundary.
Offset Registers
Eight pseudo-registers (Z0-Z7) called offset registers are used to simplify the
debugging of relocatable and position-independent modules. The listing files
in these types of programs usually start at an address (normally 0) that is not
the one at which they are loaded, so it is harder to correlate addresses in the
listing with addresses in the loaded program. The offset registers solve this
problem by taking into account this difference and forcing the display of
addresses in a relative address+offset format. Offset registers have adjustable
ranges and may even have overlapping ranges. The range for each offset
register is set by two addresses: base and top. Specifying the base and top
addresses for an offset register sets its range. In the event that an address falls
in two or more offset registers' ranges, the one that yields the least offset is
chosen.