hp8041 __
cmd~ort
equ
64h
· IBM cmdlstatus port
hp8041--status~ort
equ
64h
· IBM cmdlstatus port
hp8041 __
data~ort
equ
60h
· IBM data port
hp8041--ibf--",ask
equ
02h
· Input buffer full mask
hp8041--iface_dis
equ
OADh
· Disable interface
dis_8041
proc
near
push
cx
· save working set of regs
push
ax
xor
cx,cx
· loop 64k times (if necessary)
cli
· ints must be off for this loop
dis_8041_10:
in
al,hp8041--Status~ort·
get status and see if 8041
test
al,hp8041--ibf--",ask
. input buffer if full
loopnz dis_8041_10
. loop if it is
mov
al,hp8041--iface_dis
out
hp8041_cmd~ort,al
sti
pop
ax
pop
cx
ret
endp
· load disable command and
· ship it out
The following code writes a two byte command to the 8041 to turn on all the keyboard LED's at
once.
hp8041_cmd~ort
equ
64h
· Hp8041 cmdlstatus port
hp8041--Status~ort
equ
64h
· Hp8041 cmdlstatus port
hp8041_data~ort
equ
60h
· Hp8041 data port
hp8041--5et-.Jed
equ
Oedh
Set keyboard leds command
hp8041--ibf--",ask
equ
02h
· Input buffer full mask
led_data
equ
07h
· Led mask
to
send out
182 Keyboard
Need help?
Do you have a question about the Vectra and is the answer not in the manual?
Questions and answers