TRS-80 MODEL
III
$KBLINE-64/X'0040'
Waitfor a Linefrom the Keyboard
This routine gets a full line from the Keyboard. The line is terminated by a carriage
return
(X'OD')
or
(BREAK)
(X'Ol '). Characters typed are echoed to the display.
Entry Conditions
B = Maximumlength
of
line. When this many characters are typed,
no more will be allowed except for
(ENTER)
or
(BREAK)
(HL)
= Storage buffer. Length should be B +
l.
ExitConditions
CStatus =
(BREAK)
was the terminator.
B Number
of
characters entered.
(HL)
= Line from keyboard, followed by terminating character.
DE
is altered.
Sample Z-80 Programming
See$CSHWR.
$KBWAIT
-73/X'0049'
Waitfor a Keyboard Character
This routine scans the keyboard until akey is pressed.
If
(BREAK)
is pressed, it will
be returned in
A like any otherkey. Thecharactertyped is not echoed to the
Display.
Entry Conditions
None
12/12