Tandy 1000 Programmer's Reference Manual page 43

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter
1 I
System Calls
ConInputNoEcho
Read Keyboard
Function Call 08H
Waits for a character to be typed at the keyboard, and
then returns it in AL. If CONTROL-C is pressed, Inter-
rupt 23H is executed. This call does not echo the charac-
ter.
(For
a
keyboard
input
function
that
echoes
the
character and checks for CONTROL-C, see Function Call
01H.)
Entry Conditions:
AH
=
r D 8 H
E xi t Conditions:
AL
=
character from keyboard
Macro Iiefinition:
read-
k
bd
macro
mov
ah,08H
int
2 1 H
endm
Example:
The following program prompts for a password
(8
charac-
ters maximum) and places the characters into a string
without echoing them.
pa
5
5
word
prompt
db "Password:
5 "
;see
Function 09H
db
8
dup(7)
;for explanation
o f
$
f unc-08H
:
display prompt
mov
C X , ~
xor
bx,bx
read-k bd
cmp
a1,ODH
]e
continue
mov
password[bxl,al
inc
bx
loop
get-pass
ge t-pa5
5
:
continue:
;see
Function 09H
;maximum length
o f
;password
;BL
can
be
an index
;THIS FUNCTION
;was
i t
a
CR7
;yes,
all
done
; n o ,
p u t
char.
i n
string
;bump index
;get another character
;BX
ha5 length
o f
;password
+
1
41

Advertisement

Table of Contents
loading

Table of Contents