BBS: Inland Empire Archive Date: 11-18-92 (14:37) Number: 396 From: EARL MONTGOMERY Refer#: NONE To: MARK THOMAS Recvd: NO Subj: EGA/VGA Conf: (2) Quik_Bas
Mark the following code should get you started. Noticed we have done nothing with the palettes. If you are interested in learning how to save the palettes leave me a post. We are dealing with default palettes in this example: DEFINT A-Z SCREEN 9: CLS COLOR 8 FOR X = 0 TO 50 TRYAGAIN: E = RND * 5 IF E < 2 THEN GOTO TRYAGAIN H = RND * 639: V = RND * 349 doagain: R = RND * 120: IF R < 5 THEN GOTO doagain CIRCLE (H, V), R, , , , E PAINT (H + 2, V + 2), RND * 15, 8 NEXT DEF SEG = &HA000 OUT &H3CE, 4: OUT &H3CF, 0: BSAVE "BLUE.BIN", 0, 28000 OUT &H3CE, 4: OUT &H3CF, 1: BSAVE "GREEN.BIN", 0, 28000 OUT &H3CE, 4: OUT &H3CF, 2: BSAVE "RED.BIN", 0, 28000 OUT &H3CE, 4: OUT &H3CF, 3: BSAVE "INT.BIN", 0, 28000 OUT &H3C3, 4: OUT &H3CF, 0: DEF SEG CLS DEF SEG = &HA000 OUT &H3C4, 2: OUT &H3C5, 1: BLOAD "BLUE.BIN", 0 OUT &H3C4, 2: OUT &H3C5, 2: BLOAD "GREEN.BIN", 0 OUT &H3C4, 2: OUT &H3C5, 4: BLOAD "RED.BIN", 0 OUT &H3C4, 2: OUT &H3C5, 8: BLOAD "INT.BIN", 0 OUT &H3C, 2: OUT &H3C5, &HF: DEF SEG WAITFORKEY: I$ = INKEY$: IF I$ = "" THEN GOTO WAITFORKEY CLS SCREEN 13 COLOR 8 FOR X = 0 TO 50 TRYAGAIN1: E = RND * 5 IF E < 2 THEN GOTO TRYAGAIN1 H = RND * 320: V = RND * 200 DOAGAIN1: R = RND * 60: IF R < 5 THEN GOTO DOAGAIN1 CIRCLE (H, V), R, , , , E PAINT (H + 2, V + 2), RND * 255, 8 NEXT DEF SEG = &HA000 BSAVE "SCREEN13.BIN", 0, 63999 CLS BLOAD "SCREEN13.BIN", 0 DEF SEG HOLDSCREEN: GOTO HOLDSCREEN Notice the EGA screen 9 has four bit planes. The VGA screen 13 can be saved in one file 64000 bytes in size. Of course you can use any file names you desire. Hope this helps. Earl --- Maximus 2.01wb * Origin: Rabbit and Snake's BBS - Richardson, Texas (1:124/6108)
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