[an error occurred while processing this directive]
|
Дельфийские процедуры. Перекуёшь в Си (если надо).
[code]
function Inp32(PortAddress:smallint):byte;stdcall;export;
var
ByteValue:byte;
begin
asm
push dx
mov dx, PortAddress
in al,dx
mov ByteValue,al
pop dx
end;
Inp32:=ByteValue{ and $00FF};
end;
procedure Out32(PortAddress:smallint;Value:smallint);stdcall;export;
var
ByteValue:Byte;
begin
ByteValue:=Byte(Value);
asm
push dx
mov dx,PortAddress
mov al, ByteValue
out dx,al
pop dx
end;
end;
[/code]
Лучше сформулируй задачу, а как её оптимальней сделать - мы подскажем.
E-mail: info@telesys.ru