Как узнать адрес LPT-порта?

Эта функция работает в Win95 и Win98.

function GetPortAddress(PortNo: integer): word; assembler; stdcall;

asm

 push es

 push ebx

 mov ebx, PortNo

 shl ebx,1

 mov ax,40h // Dos segment adress

 mov es,ax

 mov ax,ES:[ebx+6] // get port adress in 16Bit way :)

 pop ebx

 pop es

end;

Для NT можно заглянуть сюда: http://www.wideman-one.com/gw/tech/Delphi/iopm/index.htm

Отправить комментарий

Проверка
Антиспам проверка
Image CAPTCHA
...