set_B041
proc
near
push
cx
save working set of regs
push
bx
push
ax
xor
cx,cx
loop 64k times (if necessary)
mov
bh,led_data
load data for loop
mov
b~hp8041--set-1ed
load command
cli
ints must be off for this loop
set_B04'_'0:
in
al,hp8041--status-port
get status and see if 8041
test
al,hp8041--ibf--"Jask
input buffer if full
loopnz set_804'_'0
loop if it is
mov
al,bl
load command and
out
hp8041_data-port,al
ship it out
cmp
bh,al
did
we
output both bytes
je
set_8041--.20
yes, skip out
mov
bl,bh
set up for next iteration
xor
cx,cx
jmp
short set_804'_'
0
loop
,..
set_8041--.20:
sti
CHANGE this
to
restore
int flag
to
previous state
instead of on (if needed)
pop
ax
pop
bx
pop
cx
ret
set_8041
endp
Table 5.17 lists the 8041 Controller Commands. These commands are categorized as READ,
SNGL, or DBL. READ commands cause the 8041 Controller to place the indicated data byte in it's
output buffer, input port 60H, to be read by the 80286. SNGL commands are commands written
to output port 64H. DBL byte commands are written to output port 64H with the following data
byte being written to output port 60H.
Keyboard
183
Need help?
Do you have a question about the Vectra and is the answer not in the manual?
Questions and answers