为什么我这段VC++中内嵌的汇编代码当执行INT 13中断时就出错??
为什么我这段VC++中内嵌的汇编代码当执行INT 13中断时就出错??
void CWinDiskDlg::OnButtonDialogMain()
{
//GetDriverCount();
for(int i=0;i<4;i++)
{
//check the drive, use INT 13H AH=10h
inregs.h.ah=0x10;
inregs.h.dl=0x80+i;
__asm{
mov AH,inregs.h.ah// AH=10h
mov DL,inregs.h.dl// the number of the driver, the start value is 80H
INT 13H//disk I/O call VC显示这里不行!!
mov outregs.h.ah,AH// AH is the state flag, if AH==00,the state is right
}//end _asm
if(outregs.h.ah==0x0)//when AH=state,=00,then the state is right
drive_count++;
}//end for
CString info;
info.Format("%i",drive_count);
MessageBox(info,"huang",MB_OK);
}