运行时总有一个错误 'int86' : undeclared identifier

wb_it_man 2016-03-20 01:03:03
我在运行的时候,总是有一个错误, 'int86' : undeclared identifier,我百度了一些说是头文件的问题,我改了一些,都不行,还是有这个错误



#include <stdio.h>
#include<conio.h>
#include<Dos.h>
struct WORDREGS
{unsigned int ax,bx,cx,dx,si,di,cflag,flags;};
struct BYTEGEGS
{
unsigned int al,ah,bl,bh,cl,ch,dl,dh;};
union REGS
{
struct WORDREGS x;
struct BYTEGEGS h;
};
void cls(void)
{ union REGS r;
r.h.ah=6; /*子功能号*/
r.h.al=0;
r.h.ch=0; /*左上角坐标*/
r.h.cl=0;
r.h.dh=24; /*右下角坐标*/
r.h.dl=79;
r.h.bh=7; /*7表示黑色*/
int86(0x10,&r,&r); /*系统功能调用*/
}
//定位子程序:
void locate(int x, int y)
{ union REGS r;
r.h.ah=2; /*子功能号*/
r.h.dh=x; /*定位点坐标*/
r.h.dl=y;
r.h.bh=0;
int86(0x10,&r,&r);
}
//在指定位置写参数:
void writech(int x , int y, char ch ,int attr)
{ union REGS r;
locate(x ,y);
r.h.ah=9;
r.h.bh=0;
r.h.al=ch;
r.h.bl=attr;
r.x.cx=1;
int86(0x10,&r,&r);
}
void main()
{int i,x=10,y=10;
cls();
for(i=0;i<26;i++)
writech(x , y+i,65+i,7);
getch();
}
...全文
318 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lm_whales 2016-03-23
  • 打赏
  • 举报
回复
DOS下的程序
vanchristin 2016-03-21
  • 打赏
  • 举报
回复
是不是少包含了什么头文件,看看int86在哪里
赵4老师 2016-03-21
  • 打赏
  • 举报
回复
bc++3.1 帮助里面对每个函数都有一小段能拷贝出来运行看效果的例子程序。非常适合初学C语言。相比较而言VC带的帮助MSDN就没有。http://download.csdn.net/source/2805028

cocoabird 2016-03-20
  • 打赏
  • 举报
回复
转到int86定义看看

69,371

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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