CGA136.BAS 6/6

 BBS: Inland Empire Archive
Date: 06-14-93 (11:55)             Number: 399
From: PETER BARNEY                 Refer#: NONE
  To: GERALD RICHTER                Recvd: NO  
Subj: CGA136.BAS 6/6                 Conf: (2) Quik_Bas
'>>> Start of page 6.

' right now, I have only a 19-color spectrum set up
' so the values used should be 0-19.
'
SELECT CASE PickCol
        CASE 1: Colr = 16
        CASE 2: Colr = 17
        CASE 3: Colr = 145
        CASE 4: Colr = 18
        CASE 5: Colr = 2
        CASE 6: Colr = 160
        CASE 7: Colr = 162
        CASE 8: Colr = 174
        CASE 9: Colr = 238
        CASE 10: Colr = 230
        CASE 11: Colr = 236
        CASE 12: Colr = 228
        CASE 13: Colr = 102
        CASE 14: Colr = 108
        CASE 15: Colr = 204
        CASE 16: Colr = 68
        CASE 17: Colr = 64
        CASE 18: Colr = 65
        CASE 19: Colr = 81
        CASE ELSE
END SELECT
Spectral = Colr
IF ModeNum = 16 THEN Spectral = Colr AND 15
END FUNCTION

SUB TextDemo
Mode 136, 0

FOR y = 0 TO 15: FOR x = 0 TO 44: PixSet x, y, 255: NEXT x, y
FOR y = 0 TO 15: FOR x = 45 TO 77: PixSet x, y, Spectral(y + 1):_
 NEXT x, y
FOR y = 0 TO 15: PixSet x, y, 255: PixSet x + 1, y, 255: NEXT y

GPrint "Hello", 1, 1, 152, 1: GPrint "Hello", 2, 1, 1, 1

FOR y = 17 TO 35: FOR x = 0 TO 79: PixSet x, y, 153: NEXT x, y
GPrint "Isn't this", 0, 19, 8, 0: GPrint "Isn't this", 1, 19,_
 15, 0
GPrint "cool?", 21, 27, 8, 0: GPrint "cool?", 23, 27, 15, 0:_
 GPrint "cool?", 22, 27, 7, 0

FOR y = 37 TO 101: FOR x = 0 TO 79: PixSet x, y, 254 - (y - 37):_
 NEXT x, y

GPrint "Add life", 9, 39, -1, 0
GPrint "to your", 12, 47, -6, 0
GPrint "old CGA!", 9, 57, -13, 0
GPrint "CGA", 41, 58, -14, 0
GPrint "Nothing is", 1, 67, 0, 0
FOR J = 1 TO 10: A$ = MID$("IMPOSSIBLE", J, 1)
GPrint A$, (J - 1) * 8, 77, J - 11, 1: NEXT
FOR x = 1 TO 78: PixSet x, 93, 0: NEXT

SaveScreen "TextDemo.scn"
END SUB


'________O_/________________________| SNIP |______________________\_O_______
'        O \                        | HERE |                      / O
$$

 * Call PTS!  * 57 characters??  Not nearly enough.  I always run out of

--- TMail v1.31.3
 * Origin: Programmer's Tech Shop - Toledo, Ohio (1:234/56)
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