AT&T 6300 Programmer's Manual page 560

Gwbasic by microsoft
Hide thumbs Also See for 6300:
Table of Contents

Advertisement

DEB Statements
3-22
The following program takes two color numbers
as input and finds their position in the dither and
blinking tables and makes colored boxes in each
of the color effects.
40 SCREEN 101
'16 Color 640 x 200
45 REM
graphics mode
50 CLS:KEY OFF
'clear screen
60 REM
Input the two colors and do range checking
70 LOCATE 2,2:INPUT "Enter Color 1 (0-151" ,C1
80 IF C1 > 15 OR C1 < 0 THEN GOTO 70
90 LOCATE 3,2:INPUT "Enter Color 2 (0-151 " ,C2
100 IF C2 > 15 OR C2 < 0 THEN GOTO 90
110 IF C1 = C2 THEN INPUT "Colors must be different
hit <CR> ",A$:CLS:GOTO 70
120 REM Set one color to high and one to low to
125 REM determine the position in the respective
130 REM tables
140 IF C1 < C2 THEN LOW = C1:HIGH = C2
ELSE LOW = C2:HIGH = C1
150 REM Blinking is the sum of 16-1 as I ranges
155 REM from 0 to the lower of the two colors
160 REM then adding the higher of the two colors
170 ROWMIN = 0
180 FOR 1= OTO LOW
190 ROWMIN = ROWMIN + (16-1)
200 NEXT I
210 BLlNKCOL=ROWMIN+ (HIGH-LOW-11
220 LOCATE 22,1
230 PRINT "Blinking Number is ";BLlNKCOL;
240 REM Dithering is 136 plus the sum of I + 1
245 REM as I ranges from 1 to the higher of the
250 REM two colors plus the lower color.
260 ROWMIN = 0
270 FOR I = 1 TO HIGH
280 ROWMIN = ROWMIN + (1-11
290 NEXT I
295 REM example continued on next page

Advertisement

Table of Contents
loading

Table of Contents