ismos.c
来自「自己编写的多任务系统的 C 语言源代码」· C语言 代码 · 共 36 行
C
36 行
/**
PC-MOS/386 Ver. 3.0 Interface Functions
Copyright (C) 1988, 1989 More Custom Software. All rights reserved.
Written in Microsoft C ver. 5.1
Copyright Microsoft Corporation, 1984-1987. All rights reserved.
- Description -
Checks if the operating system is PC-MOS/386.
- Return -
0 if not PC-MOS/386.
Version number if MOS.
**/
#include <dos.h>
#include <mos.h>
int ismos()
{
union REGS inregs, outregs;
int results;
inregs.h.ah = 0x30;
results = intdos(&inregs, &outregs);
if (results != 0x1403)
return(0);
inregs.x.ax = 0x3000;
inregs.x.bx = 0x3000;
inregs.x.cx = 0x3000;
inregs.x.dx = 0x3000;
results = intdos(&inregs, &outregs);
if (results != 0x1403)
return(results);
return(0);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?