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

wb_it_man wb_it_man 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我在运行的时候,总是有一个错误, '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();
}
...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
wb_it_man
C语言 70,039 成员 243,237 内容