home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l196 / 3.ddi / COLORS.BA$ / COLORS.bin
Encoding:
Text File  |  1990-06-24  |  1.2 KB  |  45 lines

  1. SCREEN 1
  2.  
  3. Esc$ = CHR$(27)
  4. ' Draw three boxes and paint the interior
  5. ' of each box with a different color:
  6. FOR ColorVal = 1 TO 3
  7.    LINE (X, Y) -STEP(60, 50), ColorVal, BF
  8.    X = X + 61
  9.    Y = Y + 51
  10. NEXT ColorVal
  11.  
  12. LOCATE 21, 1
  13. PRINT "Press ESC to end."
  14. PRINT "Press any other key to continue."
  15.  
  16. ' Restrict additional printed output to the 23rd line:
  17. VIEW PRINT 23 TO 23
  18. DO
  19.    PaletteVal = 1
  20.    DO
  21.  
  22.       ' PaletteVal is either 1 or 0:
  23.       PaletteVal = 1 - PaletteVal
  24.  
  25.       ' Set the background color and choose the palette:
  26.       COLOR BackGroundVal, PaletteVal
  27.       PRINT "Background ="; BackGroundVal; 
  28.       PRINT "Palette ="; PaletteVal;
  29.  
  30.       Pause$ = INPUT$(1)        ' Wait for a keystroke.
  31.       PRINT
  32.    ' Exit the loop if both palettes have been shown,
  33.    ' or if the user pressed the ESC key:
  34.    LOOP UNTIL PaletteVal = 1 OR Pause$ = Esc$
  35.  
  36.    BackGroundVal = BackGroundVal + 1
  37.  
  38. ' Exit this loop if all 16 background colors have
  39. ' been shown, or if the user pressed the ESC key:
  40. LOOP UNTIL BackGroundVal > 15 OR Pause$ = Esc$
  41.  
  42. SCREEN 0                     ' Restore text mode and
  43. WIDTH 80                     ' 80-column screen width.
  44.  
  45.