PROGRAM EGA_DEMO; {This program is a simple demonstration of the EGA graphics primitives found in ega_prim.inc} {$I ega_prim.inc} VAR i, xpos, ypos : INTEGER; answer : CHAR; PROCEDURE triangle(x1, y1, x2, y2, x3, y3 : INTEGER); BEGIN draw(x1, y1, x2, y2); draw(x2, y2, x3, y3); draw(x3, y3, x1, y1) END; BEGIN Init_graphics; FOR i := 1 TO 90 DO triangle(0 + i SHL 2, 0, 100, 300 - i SHL 2, 100 + i SHL 2, 50); FOR i := 0 TO 250 DO BEGIN xpos := round( 120*cos( i/pi)); ypos := round( 100*sin( i/pi)); circle(320 + xpos, 175 + ypos, i MOD 80) END; FOR i := 5 TO 65 DO circle(585, 300 - i SHL 2, 35); {**** No prompt is given the user since it would be printed.} READ(kbd, answer); IF upcase(answer) = 'Y' THEN Screen_dump; textmode(bw80) END.