PROGRAM BigX;
{Programmer:  Gregory A. Perkins
		      CS 65}
{The motivation for this program comes from the 2nd midterm in CS 65.
	The program uses the graphics routines from cs65.p to draw a big
	'X' taking up the entire screen.  The program uses the LINE
	statements to draw the 'X' first, then the screen is cleared and
	the program uses the PUTPIXEL statements to draw the 'X' again.}
	
USES cs65;

VAR x, y : INTEGER;
    a, b : INTEGER;

BEGIN {program}

SetGraph; {initiate graphic mode}

Pause; {paused to attempt seeing first 'X' drawn}

Line (0, 0, 639, 479);
Line (0, 479, 639, 0);

Pause; {wait for user to hit a key before continuing}

ClrScr; {clear screen before displaying new 'X'}

FOR x := 0 TO 639 DO
	BEGIN
		a := TRUNC(x * (3/4));
		PutPixel (x, a);
	END;
	
FOR x := 0 TO 639 DO
	BEGIN
		a := (TRUNC(x * (-3/4)) + 479);
		PutPixel (x, a);
	END;

Pause; {wait for user to hit a key before continuing}

END.