Re: CGA or Mono?

 BBS: Inland Empire Archive
Date: 09-11-92 (09:54)             Number: 295
From: BOB PERKINS                  Refer#: NONE
  To: WALTON DELL                   Recvd: NO  
Subj: Re: CGA or Mono?               Conf: (2) Quik_Bas
 WD>   How can I tell if a mono or color moniter is being used,
 WD> WITHOUT using ON ERROR?  Right now I just use ON ERROR with
 WD> a WIDTH 40 (can still use NOGRAPH.OBJ), but I'd like to be
 WD> able to stub out error traping!

  Bits 4 and 5 of the equipment byte are supposed to indicate whether you
have 40x25 color, 80x25 color, or 80x25 mono.  There is an
old text file around usually called peekpoke.zip on BBSs
that has a bunch of this stuff in it.  I haven't tested the
code below, so you may have to debug it.  :-)

  def seg = &H40
  equipment% = peek(&H10)    'we just need the first byte
  select case equipment% AND 48
    case 16: print "40x25 color"
    case 32: print "80x25 color"
    case 48: print "80x25 mono"
  end select


--- Msg V4.5
 * Origin: Reciprocity Failure  (1:124/4115.236)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET