在win98下运行正常,但在win2000下出错:Privileged instructionprocedure TForm1.writeport(addr:word;data: byte);
begin
asm
push edx
push eax
mov dx,addr
mov al,data
out dx,al
pop eax
pop edx
end;
end;
begin
asm
push edx
push eax
mov dx,addr
mov al,data
out dx,al
pop eax
pop edx
end;
end;
可以通过一些特殊手段来实现参见http://www.blogcn.com/user8/flier_lu/index.html?id=1957096&run=.0556816