SYSTEM CALLS
M68CPU32BUG/D REV 1
5-19
.READSTR
Read String Into Variable-Length Buffer
.READSTR
5.2.15 Read String Into Variable-Length Buffer
SYSCALL
.READSTR
TRAP CODE:
$0003
Reads a string of characters from the default input port into a buffer. The first byte in the buffer
defines the maximum number of characters that can be written to the buffer. The buffer’s size
should be no less than the first byte + 2. The maximum number of characters written to a buffer
is 254 characters, making the maximum buffer size 256. On exit, the count byte defines the
number of characters in the buffer. Enter a carriage return (<CR>) and line feed (<LF>) to
terminate the input. The characters echo to the default output port. <CR> is not echoed.
Entry Conditions:
SP ==>
Address of input buffer <long>
Exit Conditions:
SP ==>
Top of stack
The count byte containing the number of bytes in the buffer.
EXAMPLE
If A0 contains the string buffer address;
PEA
(A0)
Push buffer address
TRAP
#15
(May also invoke by SYSCALL
DC.W
3
macro (’’SYSCALL .READSTR’’)
NOTE
This routine allows the caller to define the maximum character
input length (254 characters). If more than 254 characters are
entered, then the buffer input is truncated. See Terminal
Input/Output Control character processing as described in Chapter
1.
Содержание 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 ...