function ReadPort(Port:WORD):BYTE;
procedure WritePort(Port:WORD;ConByte:BYTE);
function ReadPort(Port:WORD):BYTE;
var
B:BYTE;
begin
ASM
MOV DX, Port;
IN AL, DX;
MOV B, AL;
END;
Result:=B;
end;
procedure WritePort(Port:WORD;ConByte:BYTE);
begin
ASM
MOV DX, Port;
MOV AL, ConByte;
OUT DX, AL;
END;
end;
希望以上函数能给你启发…………