Read Line To Fixed-Length Buffer (.Readln) - Motorola M68CPU32BUG User Manual

Debug monitor
Table of Contents

Advertisement

.READLN
5.2.14 Read Line to Fixed-Length Buffer
SYSCALL
TRAP CODE: $0004
Reads a string of characters from the default input port. Characters echo to the default output
port. A string consists of a count byte followed by the characters read from the input. The count
byte indicates the number of characters read from the input as well as the number of characters in
the input string, excluding carriage return <CR> and line feed <LF>. A string may be as many as
254 characters.
Entry Conditions:
SP ==>
Exit Conditions:
SP ==>
EXAMPLE
If A0 points to a 256 byte buffer;
PEA
(A0)
SYSCALL
.READLN
The caller must allocate 256 bytes for a buffer. Input are limited to
254 characters. <CR> and <LF> are sent to default output
following echo of the input. See Terminal Input/Output Control
character processing as described in Chapter 1.
M68CPU32BUG/D REV 1
Read Line to Fixed-Length Buffer
.READLN
Address of input buffer <long>
Top of stack
The first byte in the buffer indicates the string length.
Long buffer address
And read a line from the default input port
NOTE
5-18
SYSTEM CALLS
.READLN

Advertisement

Table of Contents
loading

Table of Contents