PCAvionics pea-6005 Computer Hardware User Manual


 
95
Programming Examples
;--------------------------------------
;Input :(AH) - register index
; (AL) - Value to write
;--------------------------------------
Set_8705_Reg proc near
push ax
mov dx, 2Eh
mov al, ah
out dx, al
out 80h, al ; for I/O delay
pop ax
inc dx
out dx, al
ret
Set_8705_Reg endp
;--------------------------------------------
;Input : (AL) - logic device to be selected
;--------------------------------------------
Select_Logic_Deviceproc near
mov ah, 07h
call Set_8705_Reg
ret
Select_Logic_DeviceEndp
Key8705db 087h, 001h, 055h, 055h
Unlock_8705ProcNear
mov si, offset cs:Key8705
mov dx, 2Eh
mov cx, 4
7-0 Game Port Base Address LSBRead/Write, mapped as Base
Address [7:0]