Advertisement
Ham62

TestAdapter.bas

Jan 31st, 2017
521
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QBasic 0.84 KB | None | 0 0
  1. '*************** Start Video Adapter Testing ****************'
  2. ' Dirty little hack to check which video card we're running on
  3. ' because the way to disable text blinking is different on CGA
  4. ' from EGA/VGA+ from MDA/Hercules
  5. DIM Adapter AS INTEGER
  6.  
  7. ' Checks if card is EGA compatible
  8. ON ERROR GOTO NotEGA
  9. Adapter = 2: SCREEN 7: GOTO TestCGA        ' If this doesn't error we're EGA+
  10. NotEGA: Adapter = 1: RESUME NEXT           ' Not EGA, maybe CGA?
  11. TestCGA: IF Adapter = 2 THEN GOTO DoneTest ' If we're EGA+ don't test CGA
  12.  
  13. ' Checks if card is CGA compatible
  14. ON ERROR GOTO NotCGA
  15. SCREEN 1: GOTO DoneTest                    ' If this works for sure CGA
  16. NotCGA: Adapter = 0: RESUME NEXT           ' Not CGA, must be MDA/Hercules
  17. DoneTest: ON ERROR GOTO 0                  ' Done testing
  18. '*************** End of Video Adapter Testing ****************'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement