hewlett-packard HP 9835A — 171

Debugging 171 To permit you to analyze the execution of assembly language routines, an executable BASIC statement has been provided - Now, should you have the sequence in your program - :L 1 0 I F'HU '::;E ()H , ... F' Ie H L.L ':::; '··if .1-. ::. i:::: .:: ,:,:. ::. ::. then pressing 8 during the execution of line 120 would cause program execution to be interrupted after completion of whatever machine instruction is being executed at the time. Further, the assembly language source line associated with the following instruction is dis- played according to certain rules.

If the source lines are still in memory when you press 8 (e.g., you just assembled the object code which you are running), then the source line is displayed. If the source is no longer in memory (e.g., the object code was obtained through an ILOAD), then the instruction displayed is the result of a "reverse assembly". If there is an operand with an instruction which is reverse assembly process has no way of knowing what symbols you might have used to assemble the assembled, then the octal value of that operand is displayed (this is because the reverse instruction originally). After pressing 8, should you press B, execution resumes normally.

It is notnecessary for you to do anything (such as cleaning up the registers, etc.) for execution to resume as if you had never interrupted it. After pressing 8, you may want to observe the flow of execution of your assembly routine. This can be done by successively pressing the @ill key. Each time the key is pressed, another instruction is displayed. You may continue this way for as long as you like - until you press B to allow processing to proceed uninterrupted until the end of the routine.

machine instruction is executed and the assembly source line associated with the next machine Of course, the @ill key can be used to step through the BASIC program as you are used to guage routine from the BASIC (Le., you need only @ill into line 120 above) and not have to doing. That feature is unchanged. It is possible, therefore, to "step into" the assembly lan- use the 8 key at all.