Commodore PC Ms-Dos 3.2 User's Manual page 293

Table of Contents

Advertisement

Debug 221
Go
(^
Purpose:
Executes the program currently in memory.
r**)
Syntax:
G[ = address [addresses]]
r**)
Comments:
If you type the G (go) command by itself, the program currently
^m^
in memory executes as if it had run outside debug.
If you set = address, execution of the G command begins at the
address specified. The equal sign ( = ) is required so that debug
>-v^
can distinguish the start = address from the breakpoint addresses.
With the other optional addresses set, execution stops at the first
address encountered, regardless of that address' position in the list
f—K
of addresses that halt execution or program branching. When pro-
'
'
gram execution reaches a breakpoint, the registers, flags, and
decoded instruction are displayed for the last instruction exe-
^^^
cuted. (The result is the same as if you had typed the R (register)
f)
command for the breakpoint address.)
You may set up to ten breakpoints, but only at addresses contain-
-^
ing the first byte of an 8086 opcode. If you set more than ten
breakpoints, debug returns the BP error message.
The user stack pointer must be valid and must have 6 bytes avail-
-».
able for this command. The G command uses an IRET instruction
(
'
to cause a jump to the program under test. The user stack pointer
is set, and the user flags, Code Segment register, and Instruction
Pointer are pushed on the user stack. (If the user stack is not valid
f~*)
or is too small, the operating system may crash.) An interrupt
code (OCCH) is placed at the specified breakpoint address(es).
When debug encounters an instruction with the breakpoint code,
(~*\
it restores all breakpoint addresses to their original instructions. If
you don't halt execution at one of the breakpoints, the interrupt
codes are not replaced with the original instructions.
Example:
Suppose you type the following command:
*^
GCS:7550
(G)o
Using the Go
command
n

Advertisement

Table of Contents
loading

Table of Contents