home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / 1990 / 10 / praxis / coproz.c next >
Encoding:
C/C++ Source or Header  |  1990-07-23  |  855 b   |  26 lines

  1. /*--------------------------------------------------------*/
  2. /*                      COPROZ.C                          */
  3. /* ermittelt das Systemstatuswort über den Interrupt 11h  */
  4. /*        (c) 1990  Ulrich Schmitz  & TOOLBOX             */
  5. /*--------------------------------------------------------*/
  6. #include<stdio.h>
  7. #include<dos.h>
  8. #define SYSTEM 0x11
  9.  
  10. typedef unsigned char byte;
  11. void main()
  12. {
  13.    byte coproz;
  14.    union REGS regs;
  15.    struct SREGS segregs;
  16.    int86(SYSTEM, ®s, ®s);
  17.    printf("Konfigurations-Wort: %Xh\n", regs.x.ax);
  18.    coproz = regs.h.al << 6;
  19.    coproz = coproz >> 7;
  20.  
  21.    if (coproz) printf ("Coprozessor vorhanden!\n");
  22.       else printf("Coprozessor nicht vorhanden!\n");
  23. }
  24. /* ------------------------------------------------------ */
  25. /*                  Ende von COPROZ.C                     */
  26.