内嵌汇编编译问题Inline assembler syntax error
ghao0 2003-04-18 10:22:17 在 获取CPU序列号和硬盘序列号 中
[Error] GetCUPandHDserial.dpr(191): Inline assembler syntax error
procedure Ring0Proc;
asm
// Wait for controller not busy
mov dx,01f7h
@1:in al,dx
cmp al,050h
jne @1
// Get first/second drive
dec dx
mov al,0a0h
out dx,al
// Get drive info data
inc dx
mov al,0ech
out dx,al
nop
nop
// Wait for data ready
@2:in al,dx
cmp al,058h
jne @2
nop
nop
// Read sector
xor ecx,ecx
mov dx,01f0h
@3:in ax,dx
mov word ptr dd[ecx*2],ax //停在此处
inc ecx
cmp ecx,256
jne @3
iretd //中断返回
end;