Dec 162017
 
Quick Basic 2.0 EGA Demo - source and .exe included.
File JWEGADEM.ZIP from The Programmer’s Corner in
Category Printer + Display Graphics
Quick Basic 2.0 EGA Demo – source and .exe included.
File Name File Size Zip Size Zip Type
EGALINES.BAS 1939 925 deflated
EGALINES.DOC 2752 1325 deflated
EGALINES.EXE 42078 28891 deflated

Download File JWEGADEM.ZIP Here

Contents of the EGALINES.DOC file



EGALINES - A DEMONSTRATION OF QUICKBASIC'S EGA FACILITIES
by Joel Wasserstein, adapted from an idea supplied by Borland's
TurboPascal

EGALINES is a program I wrote originally to run on the IBM Color Graphics
Adapter. When I won QUICKBASIC at last August's CPCUG meeting, I set out to
write a program which duplicated (or approximated) a graphics demo program
which comes with TurboPascal.

Recently, at work, my coworker installed an ORCHID TURBOEGA and an EGA monitor
in his PC. Occasionaly, when I stay after hours, I would play with what I
called my linedance program ... And then I adapted it to take advantage of the
colors.

Included in EGALINES.ARC are:
EGALINES.EXE - a standalone .EXE program compiled under QUICKBASIC 2.0
EGALINES.BAS - the source code for same
EGALINES.DOC - what you are reading now

Basically the program demonstrates the way the PALETTE command is used to
reassign colors to those normally assigned for SCREEN 1 graphics. (It can also
be used to assign 2 colors to SCREEN 2 graphics.)

EGALINES asks you for two inputs. The first is the number of iterations you
wish it to go thru. An iteration is a series of parallel lines drawn between
four points chosen at random. The first two sets are always the last two from
the previous iteration. The second input is the number of lines you want drawn
on the screen before the program begins redrawing...that is, unplotting the
lines...In this way, the pattern is erased from behind. If you type 2501, no
redraw will take place...if you type 0, nothing will appear on the screen. If
you type 1 thru 2500, that many lines will be drawn before EGALINES begins
removing lines (i.e., plotting the same line in the backround color)

The best results, I have found, come from specifying from 30 to 120 for a
redraw value. You will be able to see the patterns being redrawn, and you
should see the lines change color from one iteration to the next, going thru 14
colors (I began with color 2 and end with 15, mainly because color 1, dark
blue, is hard to see). Every 48 iterations, the backround color changes; it
takes on one of eight colors.

The program will run on any EGA. However, the BASIC program requires the
QUICKBASIC 2.0 compiler ... it will not run on the BASICA interpreter.

CGALINES.BAS and CGALINES.EXE are included for those of you not fortunate
enough to have access to an EGA. CGALINES is not as random as EGALINES -
EGALINES chooses the number of lines in an iteration and the time delay factor
by generating random numbers. CGALINES asks you to supply these parameters.
While EGALINES is more interesting, CGALINES makes a pleasant meditation
device.




 December 16, 2017  Add comments

Leave a Reply