MDA text attributes

 BBS: Inland Empire Archive
Date: 04-07-92 (04:07)             Number: 138
From: SCOTT WUNSCH                 Refer#: 33
  To: RICK PEDLEY                   Recvd: NO  
Subj: MDA text attributes            Conf: (2) Quik_Bas
 On 4 April 1992, Rick Pedley wrote to Scott Wunsch...

 RP>  On 04-03-92 SCOTT WUNSCH wrote to Rick Pedley...
                     ^ ^ ^
  Glad you think I'm important enough for all-capitals <g>

 RP>  SW>  On April Fool's Day, Rick Pedley wrote:
 RP> I was considering some kind of hoax for today, you know "I've managed
 RP> to write an entire operating system in PDS 7.1, no libraries!", but I
 RP> couldn't think of anything good -- maybe next year.

  What's so hard about writing an operating system? <g>

 RP>  SW>   I happen to have a mono system handy.  It will change any invalid
 RP>  SW> colour combination (eg. COLOR 3,1) to 7,0 before displaying to
 RP>  SW> ensure readability.  However, it considers 15,7 to be one of these
 RP>  SW> invalid combinations and will change it, too.
 RP> Thanks.  I think I'm going to ditch the MDA-compatible idea, but
 RP> leave an /m switch so the user can force monochrome on displays that
 RP> are semi-MDA compatible, like VGA's with monochrome monitors, and LCD
 RP> screens will probably benefit from it too.  MDA comatibility is the
 RP> kind of thing that's easiest to build in from scratch.

  Better than using /M (or /BW), why not have the program detect that for

you?  Here's a little code that sets a flag if an MDA adapter is present:

  DEF SEG = 0
  IF PEEK(&H463) = &HB4
    Colour = FALSE
    Colour = TRUE

  If you need more detection than that, I have a routine that can identify
MDA, CGA, Mono EGA, Colour EGA, Mono MCGA, Digital MCGA, Colour MCGA, PGA,
Mono VGA, and Colour VGA.  It's kinda long, though.

                                        -= Scott \\'unsch =-

... OFFLINE 1.36 * Energizer bunny arrested, charged with battery

--- Maximus 2.00
 * Origin: The Green Zone - Regina, Sask, Canada (1:140/23)
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