home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / h / htmix20.zip / MISC.ZIP / NDOSINST.PAS < prev    next >
Pascal/Delphi Source File  |  1992-07-10  |  2KB  |  43 lines

  1. program NDosInst;
  2. {┌──────────────────────────────── INFO ────────────────────────────────────┐}
  3. {│ File    : NDOSINST.PAS                                                   │}
  4. {│ Author  : Harald Thunem                                                  │}
  5. {│ Purpose : Check whether Norton DOS is installed.                         │}
  6. {│ Updated : July 10 1992                                                   │}
  7. {└──────────────────────────────────────────────────────────────────────────┘}
  8.  
  9. {────────────────────────── Compiler directives ─────────────────────────────}
  10. {$A+   Word align data                                                       }
  11. {$B-   Short-circuit Boolean expression evaluation                           }
  12. {$E-   Disable linking with 8087-emulating run-time library                  }
  13. {$G+   Enable 80286 code generation                                          }
  14. {$R-   Disable generation of range-checking code                             }
  15. {$S-   Disable generation of stack-overflow checking code                    }
  16. {$V-   String variable checking                                              }
  17. {$X-   Disable Turbo Pascal's extended syntax                                }
  18. {$N+   80x87 code generation                                                 }
  19. {$D-   Disable generation of debug information                               }
  20. {────────────────────────────────────────────────────────────────────────────}
  21.  
  22. uses Dos;
  23.  
  24. var  Regs  : registers;
  25.      VMajor,
  26.      VMinor: string[3];
  27.  
  28. begin
  29.   FillChar(Regs,SizeOf(Regs),$00);
  30.   Regs.AX := $E44D;
  31.   Intr($2F,Regs);
  32.   if Regs.AX = $44EE then
  33.   begin
  34.     Str(Regs.BL,VMajor);
  35.     Str(Regs.BH,VMinor);
  36.     WriteLn('NDOS ',VMajor,'.',VMinor,' installed !');
  37.     Halt(0);     { Return error code 0 if NDOS is installed }
  38.   end
  39.   else begin
  40.     WriteLn('NDOS not installed !');
  41.     Halt(1);     { Return error code 1 if NDOS is not installed }
  42.   end;
  43. end.