Simple Pausing; Setting Break Points ,174 - HP 9835A Programming Manual

35 series desktop computer assembly development rom
Table of Contents

Advertisement

174
Debugging
Note that the address of the instruction, as well as the octal value of the instruction, is displayed
along with the source line.
This stepping facility can also be used, quite effectively, with the IBREAK statement (discussed
below).
Should the IPAUSE ON facility be no longer desired, it can be turned off with -
The two statements can appear repeatedly in a program, allowing the stepping facility to be
used in testing some programs but skipping over already proven programs. For example,
suppose you had two programs - Sorta and Sortn - but the first was already tested and the
second was not. Then this sequence might appear in your program -
: 1 . :U3
IPi::iU'3E OFF
128
ICAll Sorta(A$(*»
1 ::::C
I
F'I=1i...i:::;E
Oh
14C
ICAU_ SortnCA(*»
Stepping through this sequence results in lines 110, 120, and 130 executing without interrup-
tion, but line 140's call to Sortn would be executed instruction-by-instruction.
Executing IPAUSE ON when the facility is already in effect causes no change. Similarly, execut-
ing IPAUSE OFF when the facility is already off causes no change.
Both IPAUSE ON and IPAUSE OFF can be executed from the keyboard.
Setting Break Points
It is possible to define points in an assembly language routine where the execution should
pause should it ever reach that point. These are called "break points". They can be used to
pause execution - allowing you to utilize the stepping activity described above in IPAUSE ON
or to investigate the contents of variables, etc. They can also be used to allow branching to
some BASIC routine, giving you the power of BASIC in doing some of your debugging.
Simple Pausing
To simply pause at a break point, you need to execute the following statement in advance of
reaching that point (either in the program or from the keyboard) -
I E:F'E:F=j!-:::: {address}

Advertisement

Table of Contents
loading

Table of Contents