unit Port95;
interface
procedure outp(Addr: Word; Value: Byte);
function inp(Addr: Word): Byte;
implementation
procedure outp(Addr: Word; Value: Byte); assembler; register;
asm
mov al,cl
out dx,al
end;
function inp(Addr: Word): Byte; assembler; register;
asm
in al,dx
end;
end.
上面我是参考一篇文章的,调用时outp($1d3,$9b);调试时却dx=38811;al=8;
上面结果应该是错误的,不知错在哪里?还有assembler和register是什么意思?
interface
procedure outp(Addr: Word; Value: Byte);
function inp(Addr: Word): Byte;
implementation
procedure outp(Addr: Word; Value: Byte); assembler; register;
asm
mov al,cl
out dx,al
end;
function inp(Addr: Word): Byte; assembler; register;
asm
in al,dx
end;
end.
上面我是参考一篇文章的,调用时outp($1d3,$9b);调试时却dx=38811;al=8;
上面结果应该是错误的,不知错在哪里?还有assembler和register是什么意思?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货