home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 8 / CDASC08.ISO / VRAC / NNANS593.ZIP / DRIVERS.INC < prev    next >
Text File  |  1993-05-11  |  12KB  |  471 lines

  1. ; display specific definitions follow. You will need to add to these to 
  2. ; configure for unsupported display controllers.
  3.  
  4.      ; default generic graphics. USE THESE AS "TEMPLATES"
  5. gmode_test macro isgraphic
  6.     ; This macro is to jump if display is in an EGA/VGA 16 color 
  7.     ; "compatible" mode -- this means one which is a simple extension
  8.     ; (more rows and/or columns) than modes 10h or 12h. At minimum
  9.     ; modes 10h and 12h themselves qualify.
  10.     ; No registers may be altered.
  11.     ; Byte location "cs:video_mode" is a copy of byte 40:49H.
  12.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  13.     je    isgraphic
  14.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  15.     je    isgraphic
  16. endm
  17. gmode_code macro
  18.     ; this macro is used to tell if display is in graphics
  19.     ; mode by looking at the byte 40:49H, which is in
  20.     ; register AL at the start of the macro.
  21.     ; It is to set location cs:gmode_flag non-zero if in a graphics mode.
  22.     ; Value of 7 is reserved for the monochrome adapter.
  23.     ; No registers may be altered.
  24.     ; *NOTE* users of Paradise and possibly other VGA
  25.     ; cards will need to modifify this routine because
  26.     ; Paradise extended character modes set this byte to
  27.     ; to the value of the mode you selected.  Nicer cards
  28.     ; (Genoa and VEGA, that I know of) leave this byte at
  29.     ; "3" and all works fine!
  30.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  31.     cmp    al, 4
  32.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  33.     mov    cs:gmode_flag,al    ; non-zero value
  34. not_graphics:
  35. endm
  36.  
  37. if DOSV
  38. card_id    macro
  39.     db    'DOS/V'
  40. endm
  41.  
  42. gmode_code macro
  43.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  44.     cmp    al, 70h            ; DOS/V V-Text (03h compatible)
  45.     je    not_graphics
  46.     cmp    al, 71h            ; DOS/V V-Text (73h compatible)
  47.     je    not_graphics
  48.     cmp    al, 73h            ; DOS/V enhanced CGA mode
  49.     je    not_graphics
  50.     cmp    al, 4
  51.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  52.     mov    cs:gmode_flag,al    ; non-zero value
  53. not_graphics:
  54. endm
  55. endif                    ; DOSV
  56.  
  57. IF IBMXGA
  58. card_id    macro
  59.     db    'XGA'
  60. endm
  61. gmode_test macro isgraphic
  62.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  63.     je    isgraphic
  64.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  65.     je    isgraphic
  66. endm
  67. gmode_code macro
  68.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  69.     cmp    al, 4
  70.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  71.     cmp    al, 14H            ; 132x25
  72.     jb    not_graphics
  73.     mov    cs:gmode_flag,al    ; non-zero value
  74. not_graphics:
  75. endm
  76.  
  77. ENDIF
  78.  
  79. IF PARA480
  80. ; From Arend van den Brug
  81. card_id    macro
  82.     db    'Paradise EGA 480'
  83. endm
  84.  
  85. gmode_test macro isgraphic
  86.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  87.     je    isgraphic
  88.     cmp    cs:video_mode, 50h    ; 640x480, 16 color EGA mode
  89.     je    isgraphic
  90. endm
  91. gmode_code macro
  92.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  93.     cmp    al, 4
  94.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  95.     cmp    al, 51h            ; 51: 80x30 text 16 colors 
  96.     je    not_graphics
  97.     cmp    al, 54h            ; 54: 132x43 text 16 colors 
  98.     je    not_graphics
  99.     cmp    al, 55h            ; 55: 132x25 text 16 colors 
  100.     je    not_graphics
  101.     mov    cs:gmode_flag,al    ; non-zero value
  102. not_graphics:
  103. endm
  104. ENDIF
  105.  
  106. IF PARADISE
  107. card_id macro
  108.     db    'Paradise VGA'
  109. endm
  110. gmode_test macro isgraphic
  111.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  112.     je    isgraphic
  113.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  114.     je    isgraphic
  115.     cmp    cs:video_mode, 58h    ; 800x600, 16 color
  116.     je    isgraphic
  117. endm
  118. gmode_code macro
  119.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  120.     cmp    al, 4
  121.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  122.     cmp    al, 54h            ; modes 54 and 55 are text!
  123.     je    not_graphics
  124.     cmp    al, 55h
  125.     je    not_graphics
  126.     mov    cs:gmode_flag,al    ; non-zero value
  127. not_graphics:
  128. endm
  129. ENDIF
  130.  
  131. IF TSENG4000
  132. BAD_ERASE = TRUE            ; can't erase the display properly
  133. card_id    macro
  134.     db    'TSENG LABS 4000'
  135. endm
  136.  
  137. gmode_test macro isgraphic
  138.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  139.     je    isgraphic
  140.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  141.     je    isgraphic
  142.     cmp    cs:video_mode, 25h    ; 640x480, 16 color
  143.     je    isgraphic
  144.     cmp    cs:video_mode, 29h    ; 800x600, 16 color
  145.     je    isgraphic
  146.     cmp    cs:video_mode, 6ah    ; 800x600, 16 color
  147.     je    isgraphic
  148. endm
  149. gmode_code macro
  150.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  151.     cmp    al, 4
  152.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  153.     cmp    al, 17h            ; 80x43 Bios 9/14/90
  154.     je    not_graphics
  155.     cmp    al, 21h            ; 132x60, 44, 25, 28
  156.     jb    is_graphics
  157.     cmp    al, 24h
  158.     jbe    not_graphics
  159.     cmp    al, 26h            ; 80x60
  160.     je    not_graphics
  161.     cmp    al, 2Ah            ; 100x40
  162.     je    not_graphics
  163. is_graphics:
  164.     mov    cs:gmode_flag,al    ; non-zero value
  165. not_graphics:
  166. endm
  167. ENDIF
  168.  
  169.  
  170. IF ATT600
  171. card_id macro
  172.     db    'AT&T VDC600'
  173. endm
  174. gmode_test macro isgraphic
  175.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  176.     je    isgraphic
  177.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  178.     je    isgraphic
  179.     cmp    cs:video_mode, 47h    ; 800x600, 16 color
  180.     je    isgraphic
  181. endm
  182. gmode_code macro
  183.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  184.     cmp    al, 4
  185.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  186.     cmp    al, 54h            ; modes 54 and 55 are text!
  187.     je    not_graphics
  188.     cmp    al, 55h
  189.     je    not_graphics
  190.     mov    cs:gmode_flag,al    ; non-zero value
  191. not_graphics:
  192. endm
  193. ENDIF
  194.  
  195. IF STBVGA
  196. card_id    macro
  197.     db    'STB VGA Extra'
  198. endm
  199. gmode_test macro isgraphic
  200.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  201.     je    isgraphic
  202.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  203.     je    isgraphic
  204. endm
  205. gmode_code macro
  206.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  207.     cmp    al, 4
  208.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  209.     cmp    al, 22h            ; modes 22 and 23 are text!
  210.     je    not_graphics
  211.     cmp    al, 23h
  212.     je    not_graphics
  213.     mov    cs:gmode_flag,al    ; non-zero value
  214. not_graphics:
  215. endm
  216. ENDIF
  217.  
  218. IF TVGA16
  219. card_id    macro
  220.     db    'Tatung VGA-16'
  221. endm
  222. gmode_test macro isgraphic
  223.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  224.     je    isgraphic
  225.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  226.     je    isgraphic
  227. endm
  228. gmode_code macro
  229.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  230.     cmp    al, 4
  231.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  232.     cmp    al, 56h            ; modes 56 and 57 are text!
  233.     jb    not_graphics
  234.     cmp    al, 57h
  235.     jb    not_graphics
  236.     mov    cs:gmode_flag,al    ; non-zero value
  237. not_graphics:
  238. endm
  239. ENDIF
  240.  
  241.  
  242. IF    VEGA
  243. card_id    macro
  244.     db    'Video-Seven/Headland VGA'
  245. endm
  246. gmode_test macro isgraphic
  247.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  248.     je    isgraphic
  249.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  250.     je    isgraphic
  251.     cmp    cs:video_mode, 14h    ; 752x410
  252.     je    isgraphic
  253.     cmp    cs:video_mode, 15h    ; 720x540
  254.     je    isgraphic
  255.     cmp    cs:video_mode, 16h    ; 800x600
  256.     je    isgraphic
  257. endm
  258. gmode_code macro
  259.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  260.     cmp    al, 4
  261.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  262.     mov    cs:gmode_flag,al    ; non-zero value
  263. not_graphics:
  264. endm
  265. ENDIF
  266.  
  267.  
  268. IF    EGAWIZ
  269. card_id    macro
  270.     db    'EGA Wizard Deluxe'
  271. endm
  272. gmode_test macro isgraphic
  273.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  274.     je    isgraphic
  275.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  276.     je    isgraphic
  277.     cmp    cs:video_mode, 26h    ; 640x480, 60 line
  278.     je    isgraphic
  279.     cmp    cs:video_mode, 70h    ; 740x396
  280.     je    isgraphic
  281.     cmp    cs:video_mode, 71h    ; 800x600
  282.     je    isgraphic
  283. endm
  284. gmode_code macro
  285.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  286.     cmp    al, 4
  287.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  288.     cmp    al, 22h            ; 22-24 are nongraphic
  289.     jb    is_graphics
  290.     cmp    al, 24h
  291.     jbe    not_graphics
  292.     cmp    al, 32h            ; 32-34 are nongraphic
  293.     jb    is_graphics
  294.     cmp    al, 34h
  295.     jbe    not_graphics
  296.     cmp    al, 38h            ; 38 is nongraphic
  297.     je    not_graphics
  298. is_graphics:
  299.     mov    cs:gmode_flag,al    ; non-zero value
  300. not_graphics:
  301. endm
  302. ENDIF
  303.  
  304. IF TridentVGA
  305. card_id    macro
  306.     db    'Trident VGA'
  307. endm
  308. ; contributed by Nadav Horesh  CFNADAV%WEIZMANN.BITNET@CUNYVM.CUNY.EDU
  309. gmode_test macro isgraphic
  310.         cmp     cs:video_mode, 10h      ; 640x350, 16 color mode
  311.         je      isgraphic
  312.         cmp     cs:video_mode, 12h      ; 640x480, 16 color VGA mode
  313.         je      isgraphic
  314.         cmp     cs:video_mode, 5bh      ; 800x600, 16 color TVGA mode
  315.         je      isgraphic
  316.         cmp     cs:video_mode, 5fH      ; 1024x768 16 color TVGA mode
  317.         jnb     isgraphic
  318. endm
  319. gmode_code macro
  320.         mov     cs:gmode_flag,0         ; assume character mode (zero flag)
  321.         cmp     al, 4
  322.         jb      not_graphics            ; modes >=4 are assumed to be graphic
  323.         cmp     al, 050H
  324.         jb      is_graphics
  325.         cmp     al, 5Bh
  326.         jb      not_graphics
  327. is_graphics:
  328.     mov     cs:gmode_flag,al        ; non-zero value
  329. not_graphics:
  330. endm
  331. ENDIF
  332.  
  333. IF MAGICVGA
  334. ; Contributed by:
  335.  
  336.  
  337.  
  338. ;In-Real-Life: Andrew A. Chernov  |  Domain: ache@hq.demos.su,
  339. ;Zodiac-Sign:  Virgo              |          ache%hq.demos.su@relay.eu.net
  340. ;Organization: DEMOS Coop.,       |  Phone:  +7 095 2312129
  341. ;              Moscow, Russia     |  Fax:    +7 095 2335016
  342.  
  343. card_id    macro
  344.     db    'Magic VGA'
  345. endm
  346. gmode_test macro isgraphic
  347.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  348.     je    isgraphic
  349.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  350.     je    isgraphic
  351.     cmp    cs:video_mode, 63h    ; 720x540, 16 color
  352.     je    isgraphic
  353.     cmp    cs:video_mode, 64h    ; 800x600, 16 color
  354.     je    isgraphic
  355. endm
  356. gmode_code macro
  357.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  358.     cmp    al, 4
  359.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  360.     cmp    al, 40h         ; modes 40-43 are text!
  361.     je    not_graphics
  362.     cmp    al, 41h
  363.     je    not_graphics
  364.     cmp    al, 42h
  365.     je    not_graphics
  366.     cmp    al, 43h
  367.     je    not_graphics
  368.     cmp    al, 50h         ; modes 50-53 are text!
  369.     je    not_graphics
  370.     cmp    al, 51h
  371.     je    not_graphics
  372.     cmp    al, 52h
  373.     je    not_graphics
  374.     cmp    al, 53h
  375.     je    not_graphics
  376.     mov    cs:gmode_flag,al    ; non-zero value
  377. not_graphics:
  378. endm
  379. ENDIF
  380. IF    CHIPS
  381. ; From Arend van den Brug
  382. card_id    macro
  383.     db    'Chips SVGA'
  384. endm
  385.  
  386. gmode_test macro isgraphic
  387.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  388.     je    isgraphic
  389.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  390.     je    isgraphic
  391.     cmp    cs:video_mode, 6Ah    ; 800x600, 16 color
  392.     je    isgraphic
  393.     cmp    cs:video_mode, 70h    ; 800x600, 16 color
  394.     je    isgraphic
  395. endm
  396. gmode_code macro
  397.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  398.     cmp    al, 4
  399.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  400.     cmp    al, 60h            ; 60: 132x25 text 16 colors (char 8x14)
  401.     jb    is_graphics        ; 61: 132x50 text 16 colors (char 8x8)
  402.     cmp    al, 62h            ; 62: 132x43 text 16 colors (char 8x8)
  403.     jbe    not_graphics
  404.     cmp    al, 64h            ; 80x43 text 16 colors (char 9x8)
  405.     je    not_graphics
  406.     cmp    al, 65h            ; 80x50 text 16 colors (char 9x8)
  407.     je    not_graphics
  408. is_graphics:
  409.     mov    cs:gmode_flag,al    ; non-zero value
  410. not_graphics:
  411. endm
  412. ENDIF
  413.  
  414.  
  415. IF ATI
  416. ; Contributed by Yaron Keren 
  417.  
  418. card_id    macro
  419.     db  'VGAWonder'
  420. endm
  421.  
  422. gmode_test macro isgraphic
  423.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  424.     je    isgraphic
  425.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  426.     je    isgraphic
  427.     cmp     cs:video_mode, 53h      ; 800x560, 16 color
  428.     je    isgraphic
  429.     cmp     cs:video_mode, 54h      ; 800x600, 16 color
  430.     je      isgraphic
  431. endm
  432. gmode_code macro
  433.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  434.     cmp    al, 4
  435.     jb    not_graphics        ; modes >=4 are assumed to be graphic
  436.     cmp     al, 23h                 ; 132x25
  437.     je     not_graphics
  438.     cmp     al, 33h            ; 132x44
  439.     je    not_graphics
  440.     mov    cs:gmode_flag,al    ; non-zero value
  441. not_graphics:
  442. endm
  443. ENDIF
  444.  
  445.  
  446. IF FAHREN1280
  447. card_id macro
  448.     db    '1280',248,'F'
  449. endm
  450. gmode_test macro isgraphic
  451.     cmp    cs:video_mode, 10h    ; 640x350, 16 color mode
  452.     je    isgraphic
  453.     cmp    cs:video_mode, 12h    ; 640x480, 16 color VGA mode
  454.     je    isgraphic
  455.     cmp    cs:video_mode, 6Ah    ; 800x600, 16 color
  456.     je    isgraphic
  457. endm
  458. gmode_code macro
  459.     mov    cs:gmode_flag,0        ; assume character mode (zero flag)
  460.     cmp    al, 4
  461.     jb    not_graphics        ; modes =>4 are assumed to be graphic
  462.     cmp    al, 54h            ; 132x43 text
  463.     je    not_graphics
  464.     cmp    al, 55h            ; 132x25 text
  465.     je    not_graphics
  466.     mov    cs:gmode_flag,al    ; non-zero value
  467. not_graphics:
  468. endm
  469. ENDIF
  470.  
  471.