I'm not an fasm expert... But, according to this post... Which may or may not be for fasm...
http://board.flatassembler.net/topic.php?t=8638
Set your bios as Bidirectional Parallel port mode (SPP)
This sets the I/O permission:
mov eax,101 ; SYS_IOPERM
mov ebx,Base_Parallel ; 378H
mov ecx,Size ; 3
mov edx,1 ; Turn ON
int 80H
test eax,eax
js Error_Set_IO
To Write:
mov dx,37ah
in al,dx
and al,11011111b ; reset bit 5 ( Write mode)
out dx,al
mov al,0ffh ; turn on all 8 pin
mov dx,378h
out dx,al ; Write byte
To Read:
mov dx,37ah
in al,dx
or al,00100000b ; set bit 5 ( Read mode)
out dx,al
mov dx,378h
in al,dx ; Read byte