video memory segment

 BBS: Inland Empire Archive
Date: 05-30-92 (04:31)             Number: 184
From: MICHAEL MALLEY               Refer#: 114
  To: CORIDON HENSHAW               Recvd: NO  
Subj: video memory segment           Conf: (2) Quik_Bas
CH> JG> MB>   FUNCTION CRT%
CH> JG> MB>      IF (PEEK(1040) AND 48) = 48 THEN
CH> JG> MB>          CRT = 0  '<-------- monochrome, use &HB000
CH> JG> MB>      ELSE
CH> JG> MB>          CRT = -1 '<-------- color, use &HB800
CH> JG> MB>      END IF
CH> JG> MB>   END FUNCTION

CH> JG>     I tried that on my monochrome monitor and it told me that I had
CH> JG> color. Then I ran my CGA simulator and it said that I had monochrome.

CH>I would guess that a CGA simulator (software) wouldn't be
CH>detected by a program that accesses that hardware.

Hey guys, did you notice that there is no DEF SEG in that function?  As
it stands, you are looking in DGROUP.  - Michael  :)

 * SLMR 2.1a * Have you ever just, well... sort of noticed your tongue?

--- Maximus 2.01wb
 * Origin: UltraTech - Nashville, TN  (615) 356-0453 {HST} (1:116/30)
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