函数名: int86x
功 能: 通用8086软中断接口
用 法: #include <dos.h>
int int86x(int intr_num, union REGS *insegs, union REGS *outregs, struct SREGS *segregs);
程序例:
#include <dos.h>
#include <process.h>
#include <stdio.h>
int main(void)
{
char filename[80];
union REGS inregs, outregs;
struct SREGS segregs;
printf("Enter filename: ");
gets(filename);
inregs.h.ah = 0x43;
inregs.h.al = 0x21;
inregs.x.dx = FP_OFF(filename);
segregs.ds = FP_SEG(filename);
int86x(0x21, &inregs, &outregs, &segregs);
printf("File attribute: %X\n", outregs.x.cx);
return 0;
}