为什么我这段VC++中内嵌的汇编代码当执行INT 13中断时就出错??

tsingmei 2003-02-21 05:36:04
为什么我这段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);
}
...全文
91 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
tsingmei 2003-02-23
  • 打赏
  • 举报
回复
nuaawenlin(飘人) 简直就是胡说八道!!
icelight 2003-02-22
  • 打赏
  • 举报
回复
先跳到ring0再说。
nuaawenlin 2003-02-22
  • 打赏
  • 举报
回复
inregs.h.ah
inregs.h.dl
要定义成全局变量,在*.app文件头定义
ttzzgg_80713 2003-02-22
  • 打赏
  • 举报
回复
nt/2k下不可以使用中断的,
xinguang 2003-02-22
  • 打赏
  • 举报
回复
Windows系统下不能直接调用中断!
可以通过VXD调用!
LookSail 2003-02-21
  • 打赏
  • 举报
回复
gz

2,644

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 硬件/系统
社区管理员
  • 硬件/系统社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧