BBS: Inland Empire Archive Date: 05-27-92 (21:22) Number: 158 From: MATT HART Refer#: NONE To: MARK BUTLER Recvd: NO Subj: video memory segment Conf: (2) Quik_Bas
> MB> FUNCTION CRT% > JG> I tried that on my monochrome monitor and it told me that I MB> ??? that's weird. I retested this again on my CGA (Crumby Graphics Here's two algorithms for determining monitor type. The first is the memory location for the current screen mode: color monitors start in 3 (SCREEN 0, WIDTH 80) but can change; monochrome monitors should always register 7. DEF SEG = 0 M = PEEK(&H0449) DEF SEG IF M = 7 THEN PRINT "Monochrome" ELSE PRINT "Color" Here's another, and should be very reliable. It's the address of the CRT controller index register. 0000:0463h = B4h for monochrome and D4h for color. DEF SEG = 0 M = PEEK(&H0463) DEF SEG IF M = &HB4 THEN PRINT "Monochrome" ELSE PRINT "Color" --- * Origin: Midnight Micro! V.32/REL (918)451-3306 (1:170/600)
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