SYSTEM CALLS
M68CPU32BUG/D REV 1
5-28
.WRITD
Output String with Data
.
.WRITD
.WRITDLN
.WRITDLN
EXAMPLE
The following section of code .....
ERRMESSG
DC.B
$15,’ERROR CODE = ’,’|10,8Z|’
MOVE.L
#3,-(A5)
Push error code on data stack
PEA
(A5)
Push data stack location
PEA
ERRMESSG(PC)
Push address of string
SYSCALL
.WRITDLN
Invoke function
TST.L
(A5)+
De-allocate data from data stack
. . . . . prints this message:
ERROR CODE = 3
NOTE
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 data fields within the string as follows:
'|<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.