不知你的编译器是否支持int86这个函数
#include<stdio.h>
#include<dos.h>
#include<conio.h>
struct WORDREGS
{
unsigned int ax,bx,cx,dx,si,di,cflag,flags;
};
struct BYTEREGS {
unsigned char al,ah,bl,bh,cl,ch,dl,dh;
};
union REGS {
struct
WORDREGS x;
struct
BYTEREGS h;
};
void StopBreak()
{
union REGS in,out;
int cc = 0x21;
in.x.ax=0x3301;
in.x.dx=0;
int86(cc,&in,&out);
}
int main()
{
int a;
long b;
StopBreak();
for(a=0;a<100; a)
{
StopBreak();
printf("Line %d.\n",a);
for(b=0;b<500000L; b);
}
return 0;
}