home *** CD-ROM | disk | FTP | other *** search
- /* ------------------------------------------------------ */
- /* ANSI.C */
- /* stellt fest, ob ANSI.SYS geladen ist */
- /* Returncode: 1 -> ANSI.SYS geladen */
- /* 2 -> ANSI.SYS nicht geladen */
- /* 3 -> falsche DOS-Version */
- /* (c) 1992 Michael Winter & DMV-Verlag */
- /* ------------------------------------------------------ */
-
- #include <stdio.h>
- #include <dos.h>
- #include <stdlib.h>
-
- /* --- Funktionsprototypen ------------------------------ */
-
- int main(void);
- int ansi(void);
- int dr_dos();
-
- /* --- Programm ----------------------------------------- */
-
- int main(void)
- {
- printf("\n\n");
- printf("ANSI 1.0 - (c) 1992 Michael Winter & DMV-Verlag");
-
- if ( ( _osmajor < 4 ) || dr_dos() )
- {
- printf("\nMindestens MS-/PC-DOS 4.0 erforderlich!\n\n");
- exit(3);
- }
-
- printf("\n\nANSI.SYS ");
-
- if ( ansi() )
- {
- printf("installiert\n\n");
- exit(1);
- }
- else
- {
- printf("nicht installiert\n\n");
- exit(2);
- }
- }
-
- int ansi( void )
- {
- union REGS regs;
-
- regs.x.ax = 0x1A00;
-
- int86( 0x2F, ®s, ®s );
-
- if ( regs.h.al == 0xFF )
- return(1);
- else
- return(2);
- }
-
- int dr_dos()
- {
- union REGS regs;
-
- regs.x.ax = 0x4452;
- intdos( ®s, ®s );
- return !regs.x.cflag;
- }
- /* ------------------------------------------------------- */
- /* Ende von ANSI.C */
-