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

Previous  Top  Next

    
 

 

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

Code:

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

 

©Drkb::01341

Взято из http://forum.sources.ru