G
gaodu2002
Unregistered / Unconfirmed
GUEST, unregistred user!
在DELPHI6、WINXP环境下,编译 [les di, COUNT] 时出现如下错误:
Invalid combination of opcode and operands
操作码与操作对象的无效组合
该如何解决呢?
代码如下:
Function IsCDROM(Drv : Char):BOOLEAN;
Var
CDR : string;
cnt : byte;
Count,First : word;
begin
Result := false;
CDR := '';
asm
mov ax, 1500h
xor bx, bx
int $2f //CDROM中断
les di, COUNT
mov es:[di], bx
les di, FIRST
mov es:[di], cx
end;
if Count > 0 then
for cnt := 0 to (Count-1) do
CDR := CDR + char(First + Byte('A') + cnt);
Result := (Pos(upcase(Drv),CDR) > 0);
end;
来自:http://www.delphibbs.com/delphibbs/dispq.asp?lid=132182
Invalid combination of opcode and operands
操作码与操作对象的无效组合
该如何解决呢?
代码如下:
Function IsCDROM(Drv : Char):BOOLEAN;
Var
CDR : string;
cnt : byte;
Count,First : word;
begin
Result := false;
CDR := '';
asm
mov ax, 1500h
xor bx, bx
int $2f //CDROM中断
les di, COUNT
mov es:[di], bx
les di, FIRST
mov es:[di], cx
end;
if Count > 0 then
for cnt := 0 to (Count-1) do
CDR := CDR + char(First + Byte('A') + cnt);
Result := (Pos(upcase(Drv),CDR) > 0);
end;
来自:http://www.delphibbs.com/delphibbs/dispq.asp?lid=132182