home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / GRLF-C-2.ZIP / GFUNC / EQUIP.ASM < prev    next >
Encoding:
Assembly Source File  |  1990-05-30  |  2.1 KB  |  97 lines

  1.         page    58,132
  2. ;
  3. ; equip.asm
  4. ; contains: equip()
  5. ;
  6.         include    model.h
  7.         include    prologue.h
  8.         name    equip
  9.         pseg    equip
  10.  
  11. ;==>--    unsigned equip(void)
  12. ;
  13. ;;    DESCRIPTION:
  14. ;      Does ROM-BIOS interrupt 0x11 to determine installed equipment
  15. ;
  16. ;;    RETURNS:
  17. ;      16 bit value, indicating installed hardware
  18. ;
  19. ;        BITS    MEANING
  20. ;
  21. ;        15,14    no. printers installed 0..3
  22. ;           12    game I/O  (0=no, 1=yea)
  23. ;          11,10,9    no. RS232 cards installed 0..7
  24. ;             7,6   no. diskette drives: zero If bit 0 = 0, or
  25. ;            00=1 01=2 10=3 11=4 (If bit 0 = 1)
  26. ;          5,4   initial video mode:
  27. ;                    01 = 40x25 b/w, with color card
  28. ;                    10 = 80x25 b/w, color card
  29. ;                    11 = 80x25 b/w, monochrome card
  30. ;            0    0=no diskettes, 1=some diskettes installed.
  31. ;
  32. ;;    AUTHOR:
  33. ;      Copyright (C)1987-1990 Greenleaf Software Inc. All Rights Reserved.
  34. ;
  35. ;;;
  36.     cproc    equip
  37.     int    11h
  38.     cproce    
  39.  
  40. ;==>--    int memsize(void)
  41. ;
  42. ;;    DESCRIPTION:
  43. ;      Determines number of contiguous 1K blocks of memory known to
  44. ;      Rom-Bios Interrupt 0x12
  45. ;
  46. ;;    RETURNS:
  47. ;      Number of contiguous 1K blocks of memory
  48. ;
  49. ;;    AUTHOR:
  50. ;      Copyright (C)1987-1990 Greenleaf Software Inc. All Rights Reserved.
  51. ;;;
  52.     cproc    memsize
  53.     int    12h        ; BIOS gets data which was set at
  54.     cproce            ;  power-on diagnostic time.
  55.  
  56. ;==>--    void putverify(control)
  57. ;
  58. ;;    ARGUMENTS:
  59. ;      (int)        control    -    ON(1)    verify on
  60. ;                    OFF(0)    verify off
  61. ;;    DESCRIPTION:
  62. ;      Set/Clear DOS verify switch.
  63. ;
  64. ;;    SIDE EFFECTS:
  65. ;      verify switch changed.
  66. ;
  67. ;;    AUTHOR:
  68. ;      Copyright (C)1987-1990 Greenleaf Software Inc. All Rights Reserved.
  69. ;;;
  70.     cproc    putverify,,putverif
  71.     mov    ax,parm1_    ; get argument (0=OFF, 1=ON)
  72.     mov    ah,2Eh
  73.     int    21h        ; do it
  74.     cproce
  75.  
  76. ;==>--    int getverify(void)
  77. ;
  78. ;;    ARGUMENTS:
  79. ;      (none)
  80. ;
  81. ;;    DESCRIPTION:
  82. ;      Get setting of DOS verify switch
  83. ;
  84. ;;    RETURNS:
  85. ;      ON(1) if verify on, OFF(0) if verify off.
  86. ;
  87. ;;    AUTHOR:
  88. ;      Copyright (C)1987-1990 Greenleaf Software Inc. All Rights Reserved.
  89. ;;;
  90.     cproc    getverify,,getverif
  91.     mov    ax,5400h
  92.     int    21h        ; sets AL=0=OFF, 1=ON
  93.     xor    ah,ah        ; whole return in AL
  94.     cproce
  95.     endps
  96.     end
  97.