IoBase dw 0

outb	Macro port, val
        mov dx,cs:IoBase
	add dx,port
	mov al,val
	out dx,al
	jmp short $+2
		Endm

outw	Macro port, val
        mov dx,css:IoBase
	add dx,port
	mov ax,val
	out dx,al
	inc dx
	mov al,ah
	out dx,al
		Endm

inb		Macro port
        mov dx,cs:IoBase
	add dx,port
	in al,dx
		Endm

inw		Macro port
        mov dx,cs:IoBase
	add dx,port
	in al,dx
	inc dx
	mov ah,al
	in al,dx
	xchg al,ah
		Endm
