|
-
Mar 18th, 2001, 10:47 AM
#1
Thread Starter
Member
hi, i have very big (for me) problem. i want to write dll in c++ which i can use to acces to hardware in win2000.
in W95/98 i used two functions in delphi - GetPort and SetPort for writing and reading from address. But if i want run this prog in win2000, it appears "Privileg instruction".
function GetPort( P : WORD ) : Byte; assembler;
asm
MOV DX, P;
IN AL, DX;
end;
procedure SetPort( P : WORD; Value : Byte ); assembler;
asm
MOV DX, P;
MOV AL, Value;
OUT DX, AL;
end;
please, do you know how to let my program run correctly ??????
Thanks in advance. Standa
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|