DOS.CPP
资源名称:C++100.rar [点击查看]
上传用户:wszmarenbt
上传日期:2013-04-26
资源大小:2552k
文件大小:0k
源码类别:
Windows编程
开发平台:
Visual C++
- //THE PROGRAM IS TO DISPLAY THE DOS VERSION FOR YOU.
- //FILE DOS.CPP
- #define DOS_INTEGER 0x21
- #include <dos.h>
- #include <stdio.h>
- #include <conio.h>
- int main(void)
- {
- union REGS REGISTER;
- REGISTER.h.ah=0x30;
- int86(DOS_INTEGER,®ISTER,®ISTER);
- clrscr();
- int AL=REGISTER.h.al;
- int AH=REGISTER.h.ah;
- printf("-*-*-*-*-*- DOS VERSION IN YOUR COMPUTER IS %d.%d"
- ,AL,AH);
- getch();
- return 0;
- }