\?
Syntax:  ? [<function><sub-function>]

Description:  This command displays the debugger commands by function and
sub-function.
\BA
Syntax:  BA ? or BA *

Description:  BA ? displays all breakpoints and BA * clears all breakpoints.
\BB
Syntax:  BB ? or * or <address> <test> <byte> [...]

Description:  This command is used to set a breakpoint when a byte of memory
meets a test.

Up to 8 breakpoints may be set at one time.  If a segment is not specified,
the current data segment is used.  If any of the tests pass, the breakpoint is
taken.  To trace execution with this breakpoint enabled, either the GB or GT
command must be used.

BB ? is used to display byte breakpoints and BB * is used to clear byte
breakpoints.
\BC
Syntax:  BC ? or * or <address> [...]

Description:  This command is used to set a breakpoint when an instruction is
executed.

It performs the same function as addresses entered after the Go command,
except that these breakpoints are remembered or 'sticky'.  If a segment is not
specified, CS is presumed.  The G, GB, or GT command may be used to enable
code breakpoints.

BC ? is used to display code breakpoints and BC * is used to clear code
breakpoints.
\BM
Syntax:  BM ? or * or <address> <address> R and/or W [...]

Description:  This command is used to set a breakpoint when a range of memory
will be read and/or written as the result of an instruction.

The two addresses may have different segments, but the second address must be
higher in memory than the first address.  If a segment is not specified, the
current data segment is used.  Up to 8 breakpoints may be set at one time.  If
any of the tests pass, the breakpoint is taken.  To trace execution with this
breakpoint enabled, the GB or GT command must be used.

BM ? is used to display memory breakpoints and BM * is used to clear memory
breakpoints.
\BR
Syntax:  BR ? or * or <register> <test> <number> [...]

Description:  This command is used to set a breakpoint when a register meets a
test.

Up to one test per register may be set at one time.  If any of the tests pass,
the breakpoint is taken.  To trace execution with this breakpoint enabled, the
GB or GT command must be used.

BR ? is used to display register breakpoints and BR * is used to clear
register breakpoints.
\BW
Syntax:  BW ? or * or <address> <test> <number> [...]

Description:  This command is used to set a breakpoint when a word of memory
meets a test.

Up to 8 breakpoints may be set at one time.  If a segment is not specified,
the current data segment is used.  If any of the tests pass, the breakpoint is
taken.  To trace execution with this breakpoint enabled, the GB or GT command
must be used.

BW ? is used to display word breakpoints and BW * is used to clear word
breakpoints.
\C
Syntax:  C <range> <address>

Description:  This command is used to compare two blocks of memory a byte at a
time.

If any differences are found, the address and value of the first byte and the
value and address of the second byte is displayed.  Nothing is displayed for
bytes that match.  The two blocks of memory may be in different segments.  If
no segment is input, the current data segment is used.  The length parameter
indicates how much memory is to be compared.
\D\DB
Syntax:  D [<range>] or DB [<range>]

Description:  This command is used to display a block of memory in hex and
ASCII.

Each line of the display shows the starting segment and offset, up to 16
bytes, and their ASCII representation.

If you enter 'D', this command displays memory starting where the last 'D'
command left off.  The R command sets the starting point to DS:100.  If you
enter 'D <number>', the number is presumed to be an offset, the segment is
presumed to be DS, and the length is presumed to be 80H.  If you enter 'D
<number> <length>' the number is presumed to be an offset, and the segment is
presumed to be DS.  If a 'D' window is used, the length is set according to
the size of the window and duplicate lines are not suppressed.
\DD
Syntax:  DD [<range>]

Description:  This command is used to display a block of memory in double word
format.

This format is useful for examining data that is stored as a word offset
followed by a word segment.  Each line of the display shows the starting
segment and offset and up to 4 pairs of segments and offsets.

If you enter 'DD', this command displays memory starting where the last
display command left off.  The R command sets the starting point to DS:100.
If you enter 'DD <number>', the number is presumed to be an offset, the
segment is presumed to be DS, and the length is presumed to be 80H.  If you
enter 'DD <number> <length>' the number is presumed to be an offset, and the
segment is presumed to be DS.  If a 'D' window is used, the length is set
according to the size of the window and duplicate lines are not suppressed.
\DR
Syntax:  DR <address> <symbol>

Description:  This command is used to display a block of memory by fields as
defined by a record definition.

This format is useful for examining data that is part of a record, such as the
PSP or a FCB.  Each line of the display shows a field name and the data for
the field in byte, word, or double word format.  Any area of memory can be
displayed using any record definition.

To define a record format, a file of the name xxxx.DEF, where xxxx is the name
of the program being debugged, must be present on the same drive as the
program.  The program loader, RUN.COM, reads this DEF file when loading the
program and loads the record definitions into the record table.  You can add
record definitions to the file as needed by a specific program.

The syntax for this command is less flexible than the other display commands.
You must enter an address and a record name.  The address must have an offset
and must not include a length.  This display is not shown in the 'D' window.
\DW
Syntax:  DW [<range>]

Description:  This command is used to display a block of memory in word
format.

This format is useful for examining data that is stored as words as opposed to
bytes.  It reverses out the 'back words' style of storage used on the 8088.
Each line of the display shows the starting segment and offset and up to 8
words.

If you enter 'DW', this command displays memory starting where the last
display command left off.  The R command sets starting point to DS:100.  If
you enter 'DW <number>' the number is presumed to be an offset, the segment is
presumed to be DS, and the length is presumed to be 80H.  If you enter 'DW
<number> <length>' the number is presumed to be an offset, and the segment is
presumed to be DS.  If a 'D' window is used, the length is set according to
the size of the window and duplicate lines are not suppressed.
\E
Syntax:  E <address> [<list>]

Description:  This command is used to modify memory.

The segment and offset must be specified for the address, since this command
modifies memory.  If the optional list is present, the specified memory is
modified and the command terminates.  If the list is not present, an inter-
active mode is started.  This mode allows you to examine and optionally modify
individual bytes starting at the specified address.

For example, if you enter 'E 2000:123' and press return, the interactive mode
is started.  The program displays the address and the current value of the
byte as '2000:0123 xx.', where xx is the current value.  To modify this value,
enter the hex number (0 through FF).  Any invalid input, such as 'G9' or too
many digits, is not echoed.

Press the space bar to skip to the next byte.  Press the hyphen key to back up
one byte.  The backspace key is used to discard a single digit.  Use the
return key to terminate the interactive mode.  Note that the interactive entry
mode is not compatible with the multiple command capability of PERISCOPE --
i.e.  you cannot use semi-colons to 'stack' multiple commands on one line.
\ES
Syntax:  ES <address> <symbol>

Description:  This command is used to define or redefine symbol table entries.

A segment and offset must be specified for the address.  The symbol name must
16 characters or less and must be preceded by "@".  The symbol table is
searched for a symbol of the same name.  If an existing symbol is found, the
segment and offset associated with it are updated.  If no match is found, a
new symbol is added at the end of the symbol table.
\F
Syntax:  F <range> <list>

Description:  This command is used to fill a block of memory with a byte/
string pattern.

A segment and offset must be specified for the address, since this command
modifies memory.  The length specifies the number of bytes to be affected.
The list is the pattern that is copied into the specified range of memory.  If
the length of the list is less than the length of the range specified, the
list is copied as many times as needed to fill the range.  Conversely, if the
length of the list is greater than the length of the range, the extra bytes
are not copied.
\G
Syntax:  G [<address>] [...]

Description:  The Go command is used to set optional temporary code
breakpoints and execute the program being debugged.

If any addresses are specified on the command line, the byte at each of the
addresses is replaced with a CCH, the single-byte breakpoint.  When control is
returned to PERISCOPE via any method, the original byte is restored.  The
addresses entered on the command line are referred to as temporary code break-
points.  Up to four of these breakpoints may be used.  If the address does not
contain a segment, the current code segment is used.

To set 'sticky' code breakpoints, use the 'BC' command.  If 'G' with no
addresses is entered, the 'sticky' breakpoints, if any, are used.  If there
are no 'sticky' breakpoints, program execution continues until the button is
pressed.  You cannot set code breakpoints in ROM -- code breakpoints require
that PERISCOPE be able to exchange the original byte with CCH before starting
the Go.
\GB
Syntax:  GB [<address>] [...]

Description:  This command is the same as the normal go command, except that
it also sets the non-code or 'monitor' breakpoints.

These breakpoints are byte (BB), memory (BM), register (BR), and word (BW).
Using these breakpoints puts the system into a mode where every instruction
executed by your program is analyzed to see if a breakpoint has been reached.
This analysis can slow down the execution by a factor of 100 or more, but in
many cases is the only way to find an elusive bug.

This command differs from the GT command in that it does not trace the
execution of software interrupts performed during the execution of the
command.  PERISCOPE does not see the instruction following an INT xx, since
the trap flag is not yet turned back on.  If you need to test instructions
following an INT instruction, use the GT command or set a code breakpoint on
the instruction.

For temporary and 'sticky' code breakpoints, this command performs in the same
fashion as the go command.
\GT
Syntax:  GT [<address>] [...]

Description:  This command is the same as the GB command, except that it
forces the tracing of software interrupts called from your program.

Since the GT command monitors every instruction executed, it is slower than
the GB command.
\H
Syntax:  H <number> <arithmetic operator> <number>

Description:  This command is used to perform hexadecimal arithmetic.

Addition, subtraction, multiplication, and division are available.  The
standard symbols are used for each function.  The numbers must be in hex and
may be from one to four bytes.  If a register name is entered in place of one
of the numbers, its current value is used for the number.

Multiplication returns two words separated by spaces.  The first word is the
high-order part.  Division returns two words separated by the letter 'R'.  The
first word is the quotient and the second is the remainder.
\I
Syntax:  I <port>

Description:  This command is used to read an I/O port.

The port number may be from zero to FFFF, although the IBM PC only supports
ports from zero to 3FF -- any larger number is effectively ANDed with 3FF.
The byte value retrieved by reading the port is displayed on the line
following the command.
\J
Syntax:  J

Description:  This command is used as a shorthand form of Go -- to jump to the
next instruction.

It enables you to skip over the current instruction and go to the next
instruction on the same level.  It is used to skip over instructions that will
return to the next instruction, such as CALL and INT.  It is also useful for
quickly moving through REP prefixes and LOOPs.

Jump performs the same function as a temporary code breakpoint set on the next
instruction -- the difference is that you don't have to stop and compute the
address and then enter a Go command -- Jump does it for you.

If the current instruction is any form of a RET, IRET, or JMP, PERISCOPE
generates a Trace instruction, instead of using a code breakpoint.  This
command does not work when you're tracing ROM -- no code breakpoints can be
used, since you can't write to ROM.
\K
Syntax:  K

Description:  This command clears the debugger screen and repaints the
windows, if any.  It has no arguments.
\LA
Syntax:  LA <address> <drive> <sectors>

Description:  This command is used to load absolute disk sectors into memory.

The segment defaults to CS if no segment is specified.  The drive is a single
digit number indicating the disk drive (0=A, 1=B, etc.).  The sector parameter
is the starting sector number and the number of sectors to be read.  The
maximum number of sectors that can be read in one operation is 80H.

To use this command, DOS must not be active.  See the Name command for more
information.  This command uses DOS interrupt 25H.  See the DOS manual for
information on the numbering of the absolute disk sectors.
\LF
Syntax:  LF [<address>]

Description:  This command is used to load a file from disk into memory.

The optional address specifies where the file is to be loaded.  If an address
is not specified, CS:100 is used.  To use this command, DOS must not be
active.  See the Name command for more information.  Before this command can
be used the Name command must be used to specify a file name.

This command can be used to load any type of file into memory.  After the file
has been loaded, BX and CX indicate the file size.  After the file is loaded
into memory no other processing occurs -- EXE files are not relocated or
stripped of their headers.  RUN.COM should generally be used to load and
execute a program, since it loads the symbol table and performs relocation for
EXE files.
\M
Syntax:  M <range> <address>

Description:  This command is used to copy a block of memory to another
location in memory.

The segment and offset must be specified for both addresses, since this
command modifies memory.  If the source block and target block overlap, the
move is performed without loss of data in the target block.  The source
segment and target segment may be different.
\N
Syntax:  N <name>

Description:  This command is used to enter data into the PSP for disk I/O.

The name specified after the command is copied to the unformatted parameter
area in the PSP, starting at CS:80H.  This command copies all data entered
after the N until a carriage return is found -- it ignores the use of a
semi-colon for entering multiple commands on one line.

After the name is copied into CS:80H, the DOS parsing function is used to
parse the first two file names in the command line into the FCBs at CS:5CH and
CS:6CH.  If an invalid drive id is found on a file, a message is displayed and
register AL or AH is set to FF, indicating the first or second file.

Since the Name, Load, and Write commands use DOS calls, a check must be
performed to be sure that DOS is not currently active.  This is done by
checking a flag that is set by RUN.COM and cleared when the button is pressed.
For any of these three commands, this flag must be set, meaning that the
button has not been pressed since RUN.COM was last run.  Also, CS must be the
same as the PSP when RUN transferred control to PERISCOPE and the first two
bytes of the PSP (CS:0 and CS:1) must be CDH and 20H.  This is necessary to
validate the memory size which is read from the PSP.
\O
Syntax:  O <port> <byte>

Description:  This command is used to output a byte to an I/O port.

The port number may be from zero to FFFF, although the IBM PC only supports
ports from zero to 3FF -- any larger number is effectively ANDed with 3FF.
The byte value output to the port may be from zero to FF.
\Q
Syntax:  Q [<sub-function>]

Description:  This command is used to exit the debugger and return to
PERISCOPE's command list.  The optional sub-function is used to pre-answer the
command list prompt.  The valid sub-functions are B, C, D, R, and S.
\R
Syntax:  R [<register>] or [F]

Description:  This command is used to display and/or modify the current values
of the registers and flags.

If you enter 'R' and press return, the current values of the registers and
flags are displayed.  If the current instruction performs a memory read and/or
write, the effective address of the read/write is displayed, along with the
current value of memory at the effective address(es).  Finally, the current
instruction is disassembled.  The default segments and offsets for the 'D' and
'U' commands are reset to DS:100 and CS:IP respectively.

To modify a register, enter 'R <register>'.  PERISCOPE displays the current
value of the register, followed by a colon.  If you enter a one to four digit
hex number and press return, the register is changed.  If you press return
without entering a number, the register is not changed.

To modify a flag, enter 'R F'.  PERISCOPE displays the current values of the
flags followed by a hyphen.  To change the flags, enter the desired mnemonics
and press return.  If you press return without entering any flag mnemonics, no
flags are changed.  The flags may be entered in any order, in upper or lower
case, and with or without spaces between the entries.

If you have a 'R' window, the current value of the registers and flags are
shown after each command.  The addresses for the 'D' and 'U' commands are not
reset unless a 'R' command is used.  The effective address and disassembled
instruction are shown elsewhere.
\S
Syntax:  S <range> <list>

Description:  This command is used to search memory for a byte/string pattern.

The block of memory specified by the range is searched for the pattern
specified by the list.  If a match is found, the starting address of the match
is displayed and the search for matches continues at the next byte.  If no
matches are found, nothing is displayed.  If no segment is specified, the
current data segment is used.
\SA
Syntax:  SA <range> <address>

Description:  This command is used to search memory for references to a
specified address.

This command can be thought of as a disassembly that only shows instructions
that reference an address of interest.  To use it, specify an address range
that is to be searched and the address reference that is to be searched for.

You can use this command to find JMPs and CALLs to a procedure or to find
locations in your program where a data variable is accessed.  Any instruction
that references the specified address is displayed.
\T
Syntax:  T [<number>]

Description:  This command is used to execute the current program one
instruction at a time.

If the optional number is not entered, one instruction is executed and control
is returned to PERISCOPE.  If the number is entered, that number of instruc-
tions are executed.  After each trace, the register command is performed,
showing the next instruction to be executed.  If the 'R' or 'U' windows are
used, the register and/or disassembly information is shown in the windows.

Unlike the Go command, the Trace command can be used to trace through ROM,
since it works by changing the trap flag and not by modifying the code to be
traced.
\U
Syntax:  U [<range>]

Description:  This command is used to disassemble memory into the 8088
mnemonics and byte values.

If you enter 'U', the disassembly starts where the last 'U' command left off.
Note that the commands G, J, R, and T reset the starting point to CS:IP.  If
you enter 'U <number>' the number is presumed to be an offset, the segment is
presumed to be CS, and the length is presumed to be 20H.  If you enter 'U
<number> <length>' the number is presumed to be an offset, and the segment is
presumed to be CS.

If you have a 'U' window, the effective address of any memory reads or writes
is shown for the current instruction (CS:IP).  The disassembly follows, with
the length set to the size of the window.
\WA
Syntax:  WA <address> <drive> <sectors>

Description:  This command is used to write memory to absolute disk sectors.

The segment defaults to CS if no segment is specified.  The drive is a single
digit number indicating the disk drive (0=A, 1=B, etc.).  The sector parameter
is the starting sector number and the number of sectors to be written.  The
maximum number of sectors that can be written in one operation is 80H.

To use this command, DOS must not be active.  See the Name command for more
information.  This command uses DOS interrupt 26H.  See the DOS manual for
information on the numbering of the absolute disk sectors.

When using this command, be very careful!  An absolute disk write can very
easily destroy a file allocation table (FAT) or a disk directory!  Usually,
you will want to perform a Load Absolute, change a few bytes of memory, and
the perform a Write Absolute of the data back to disk.  If this is the case,
be sure that the parameters used with the load and write commands are the
same.
\WF
Syntax:  WF [<address>]

Description:  This command is used to write a file from memory to disk.

The optional address specifies where the memory image of the file begins.  If
the address is not specified, CS:100 is used.  To use this command, DOS must
not be active.  See the Name command for more information.  Before this
command can be used the Name command must be used to specify a file name.

This command can be used to write any type of file to disk.  Before the file
is written, be sure that BX and CX indicate the size of the file in bytes.
\X\XH
Syntax:  X <number> or XH <number>

Description:  This command is used to translate a one to four digit hex number
or a register to its decimal and binary equivalents.
\XA
Syntax:  XA <address>

Description:  This command is used to translate an address (segment and
offset) into its equivalent five-byte absolute address.

The absolute address is calculated by multiplying the segment by 10H and
adding the offset to the result.
\XD
Syntax:  XD <decimal number>

Description:  This command is used to translate a one to five digit decimal
number to its hexadecimal and binary equivalents.

The number must be from zero to 65,535.  The number may not have any
punctuation, such as commas or periods.  Numbers larger than 65,535 can be
translated, but the high order part is lost.
\/S
Syntax:  /S <segment> <segment>

Description:  This command is used to make global changes to the segment
numbers in the symbol table.

The entire symbol table is searched for symbols having a segment that matches
the first segment entered.  If a match is found, the symbol's segment is
changed to the second segment entered and the symbol name is displayed.  This
command is used to adjust the segments of symbols when a program relocates its
data areas, such as in Microsoft Pascal and FORTRAN and Digital Research C.
\
