home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c005 / 4.ddi / C / QYMODEL.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-08-05  |  935 b   |  40 lines

  1. /**
  2. *
  3. * Name        qymodel -- Report IBM model code
  4. *
  5. * Synopsis    model = qymodel();
  6. *
  7. *        char model     IBM model code:
  8. *                  IBM_PC (0xff) if IBM PC
  9. *                  IBM_XT (0xfe) if IBM PC-XT
  10. *                        or Portable PC
  11. *                  IBM_JR (0xfd) if IBM PCjr
  12. *                  IBM_AT (0xfc) if IBM PC-AT
  13. *                  IBM_CV (0xf9) if IBM PC Convertible
  14. *
  15. * Description    This function returns a code indicating which IBM PC
  16. *        model the program is running on.  The value is also
  17. *        saved in the global variable b_pcmodel declared in
  18. *        BQUERY.H.
  19. *
  20. * Returns    model         IBM model code
  21. *
  22. * Version    3.0  (C)Copyright Blaise Computing Inc.  1986
  23. *
  24. **/
  25.  
  26. #include <bquery.h>
  27.  
  28. char b_pcmodel = 0;          /* IBM PC Model Code              */
  29.  
  30. char qymodel()
  31. {
  32.     static ADS model_ads = {0x000e,0xffff};
  33.     ADS        flag_ads;
  34.  
  35.     utabsptr(&b_pcmodel,&flag_ads);
  36.     utslmove(&model_ads,&flag_ads,1);  /* Fetch model code          */
  37.  
  38.     return b_pcmodel;
  39. }
  40.