HP 68000 Series User Manual page 312

Debugger/simulator
Table of Contents

Advertisement

Chapter 9: Debugger Commands
Debugger Macro Add
Debugger Macro Call
Debugger Macro Display
Program Run
Symbol Remove
The "Using Macros and Command Files" chapter
The "Predefined Macros" chapter in this manual.
Example
Debugger Macro Add int power(x, y)
int
int
{
}
.
Debugger Macro Add void stackchk()
{
}
.
290
x;
y;
int
i;
int multiplier;
/* Multiply x by itself y -1 times */
for (i = 1, multiplier = x; i < y; i++)
x *= multiplier;
/* Return x ^y */
return x;
/* The symbols 'stack' and 'TopOfStack' exist in the compiler's */
/* environment library, and are addresses which indicate the
/* bottom and the top of the system stack. The symbol @sp is a */
/* debugger reserved symbol which contains the current value of */
/* the processor's stack pointer.
$Expression Printf "%d bytes of stack used", TopOfStack - @sp$;
$Expression Printf "%d bytes of stack available", @sp - stack$;
/* Loop counter */
/* Value x is multiplied by */
*/
*/

Advertisement

Table of Contents
loading

This manual is also suitable for:

B1466

Table of Contents