Chapter
1
I
System
Calls
AuxOutput
Auxiliary Output Function Call
04H
Outputs
a
character to the auxiliary device. No status
or
error code is returned.
If
CONTROL-C is typed
at
console input, Interrupt 23H is
executed.
Entry Conditions:
AH
=
04H
DL
=
character to output
Macro
Definition:
aux-output macro character
mov d1,character
mov ah,04H
int
21 H
endm
Example:
The following program gets
a
maximum of 80 bytes from
the keyboard, sending each to the auxiliary device. It
stops when
a
null string (CR only) is typed.
string db
81
dup(7)
;see
Function 0AH
func-04H: get-string 80,string
cmp string[lI,E
]e
continue
mov
cx, word ptr string[ll
mov bx,0
sent-it: aux-output string[bx+El
inc bx
loop send-it
imp func-04H
continue:
;see Function
0AH
;null string?
;yes,
all
done
;get
string length
;set index
to
0
;THIS
FUNCTION
;bump index
;send another character
;get
another string
36