Special Casting - HP 68000 Series User Manual

Debugger/simulator
Table of Contents

Advertisement

Chapter 10: Expressions and Symbols in Debugger Commands
Symbolic Referencing
Unlike C, the debugger allows casting to an array. The following example
casts the address of the symbol int_value to an array of four chars:
(char[4]) &int_value
This type of casting to an array can be used with both the Expression
Display_Value and Expression Monitor_Value commands.

Special Casting

In addition to the standard C type casts, the following assembly level casts are
also recognized by the debugger's expression handler.
(Q S)
This type cast coerces an expression into a quoted string. For example,
assuming the symbol int_val has a value of 0x61626364,
Expression Display_Value (Q S) &int_val
causes int_val to be displayed as "abcd". Note that the expression evaluates to
an address because the (Q S) type cast is semantically synonymous with the C
type cast (char *).
(I A)
This type cast coerces an expression into an instruction address. For example,
assuming the symbol int_val has a value of 0x400,
Breakpt Instr (I A) int_val
sets an instruction breakpoint at address 0x400.
(H D)
This type cast coerces an expression into a long word (4 bytes) and displays the
value in hexadecimal format. For example, assuming the symbol char_val has
a value of 0x3F,
Expression Display_Value (H D) char_val
will cause char_val to be displayed as 0x0000003F.
436

Advertisement

Table of Contents
loading

This manual is also suitable for:

B1466

Table of Contents