I am trying to write to ports 0x60 and 0x64, with no luck.
Delphi code:
procedure PortOut(IOport: WORD; Value: BYTE); assembler; register;
asm
XCHG DX,AX
OUT DX,AL
end;
Upon calling PortOut, I get an EPrivilege Privileged instruction exception, because IN
and OUT
may only execute as Ring0.
I would like to know how I can get Ring0 privileges my an application or how I could write to ports 0x60 and 0x64 using some existing external library.
Have a look at the IO.DLL from Geek Hideout.
IO.DLL allows seamless port I/O operations for Windows 95/98/NT/2000/XP using the same library.
Here is an example: Parallel Port I/O Using Delphi V 6.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With