This works for me in Win9x (Not NT 2K)
procedure PortOut(IOport:word; Value:byte);
//Use these values when calling the port function
Data:=888;
Status:=889;
Control:=890;
PortOut(control,1); //sets strobe output hi
PortOut(control,0); //sets strobe output lo
//Function to read the status of the printer port
function PortIn(IOport:word):byte; assembler;
asm
push dx
mov dx,ax
in al,dx
pop dx
end;
//Procedure to send data to the printer port
Procedure TMainForm.PortOut(IOport:word; Value:byte); assembler;
asm
push dx
mov dx,IOport
mov al,Value
out dx,al
pop dx
end;
PS With thanks to whoever posted this on the Internet in the first place (I forgot who)
Best Regards
Robert