; INOUT.ASM
;
; Intended for use with Fortran Powerstation.
;   OUTQQ: OUTQQuts a byte to a port.
;   INQQ:  Gets a byte from a port
;
; INTERFACE TO SUBROUTINE OUTQQ(port, value)
;   integer port[VALUE]
;   inetger value
; end
;
;
; INTERFACE TO INTEGER*4 FUNCTION INQQ(port)
;   integer port[VALUE]
; end
;

.386
.model FLAT, STDCALL

OUTQQ PROTO   STDCALL, port:SWORD, value:SWORD
INQQ  PROTO   STDCALL, port:SWORD

.CODE

OUTQQ    PROC    STDCALL, port:SWORD, value:SWORD
			   
	push ax
	push dx           
	mov ax, value
	mov dx, port
	out dx, al
	pop dx
	pop ax

	ret
OUTQQ    endp




INQQ PROC    STDCALL, port:SWORD
		
	push dx
	xor eax, eax
	mov dx, port
	in  al, dx
	pop dx
	
	ret

INQQ endp
	end
