SYSTEM CALLS
M68CPU32BUG/D REV 1
5-29
.WRITE
Output String Using Character Count
.WRITE
.WRITELN
.WRITELN
5.2.23 Output String Using Character Count
SYSCALL
.WRITE
– Output string
TRAP CODE:
$0023
SYSCALL
.WRITELN
– Output string and <CR><LF>
TRAP CODE:
$0024
.WRITE and .WRITELN format character strings with a count byte and output the string to the
default output port. After formatting, the count byte is the first byte in the string. The user passes
the starting address of the string. .WRITELN appends a <CR><LF> to the end of the string.
Entry Conditions:
Four bytes of parameters are positioned in the stack as follows:
SP ==>
Address of string.<long>
Exit Conditions:
SP ==>
Top of stack (parameter bytes removed)
EXAMPLE
MESSAGE1
DC.B
9,
"MOTOROLA "
MESSAGE2
DC.B
8,
"QUALITY!"
PEA
MESSAGE1(PC)
Push address of string
SYSCALL
.WRITE
Use TRAP #15 macro
PEA
MESSAGE2(PC)
Push address of other string
SYSCALL
.WRITE
Invoke function again
Содержание M68CPU32BUG
Страница 16: ...GENERAL INFORMATION M68CPU32BUG D REV 1 1 8 ...
Страница 30: ...DEBUG MONITOR DESCRIPTION M68CPU32BUG D REV 1 2 14 ...
Страница 102: ...DEBUG MONITOR COMMANDS M68CPU32BUG D REV 1 3 72 ...
Страница 168: ...DIAGNOSTIC FIRMWARE GUIDE M68CPU32BUG D REV 1 6 24 ...