home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
drdobbs
/
1988
/
04
/
porter
/
porter.ls5
< prev
Wrap
Text File
|
1979-12-31
|
896b
|
34 lines
MODULE Spiral;
(* Draws a spiral, then copies part of it to a window *)
FROM SYSTEM IMPORT REGISTERS, INT;
FROM LineDwg IMPORT Px, Py, line, copyArea, WriteString, clear;
FROM InOut IMPORT Read;
VAR reg : REGISTERS;
ch : CHAR;
n, d : INTEGER;
BEGIN
clear;
Px := 250;
FOR n := 0 TO 24 DO (* Draw the spiral *)
d := n MOD 8;
line (d, n * 5);
END;
Px := 548; Py := 198; (* Outline the copy window *)
line (0, 204);
line (2, 204);
line (4, 204);
line (6, 204);
Px := 630; Py := 440;
WriteString ("Copy ");
copyArea (200, 200, 550, 200, 200, 200); (* Copy portion *)
Read (ch); (* Wait for keypress *)
reg.AH := 0; reg.AL := 3; INT (16, reg);
END Spiral.