Motorola M68CPU32BUG User Manual page 142

Debug monitor
Table of Contents

Advertisement

.WRITD
.WRITDLN
EXAMPLE
The following section of code .....
ERRMESSG
DC.B
MOVE.L
PEA
PEA
SYSCALL
TST.L
. . . . . prints this message:
ERROR CODE = 3
The string must be formatted such that the first byte (the byte
pointed to by the passed address) contains the byte count of the
string, including the data field specifiers (pointer/count format –
see 5.1.2).
Format
'|<radix>,<fieldwidth>[Z]|' where <radix> is the data's numerical
base (in hexadecimal, i.e., ''A'' is base 10, ''10'' is base 16, etc.) and
<fieldwidth> is the number of data characters to output. The data is
right-justified and left-most characters are truncated to size.
Include ''Z'' to suppress leading zeros in the output.
All data is placed in the stack as longwords. Each time a data field
is encountered in the user string, a longword is displayed from the
data stack.
The data stack is not destroyed by this routine. Use the call routine
(see example above) to de-allocate space in the data stack. If it is
necessary for the space in the data stack to be de-allocated, it must
be done using the call routine, as shown in the above example.
M68CPU32BUG/D REV 1
Output String with Data
$15,'ERROR CODE = ','|10,8Z|'
#3,-(A5)
(A5)
ERRMESSG(PC)
.WRITDLN
(A5)+
NOTE
data
fields
within
5-28
Push error code on data stack
Push data stack location
Push address of string
Invoke function
De-allocate data from data stack
the
string
as
follows:
SYSTEM CALLS
.WRITD
.
.WRITDLN

Advertisement

Table of Contents
loading

Table of Contents