19.08.2007, 15:24
|
|
Прохожий
|
|
Регистрация: 07.08.2006
Сообщения: 32
Репутация: 10
|
|
Код:
procedure SetPort(address, Value:Word);
var
bValue: byte;
begin
bValue := trunc(Value and 255);
asm
mov dx, address
mov al, bValue
out dx, al
end;
end;
function GetPort(address:word):word;
var
bValue: byte;
begin
asm
mov dx, address
in al, dx
mov bValue, al
end;
GetPort := bValue;
end;
|