This page (revision-10) was last changed on 03-Feb-2023 15:25 by Roland B. Wassenberg 

This page was created on 03-Apr-2010 07:07 by Carsten Strotmann

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
10 03-Feb-2023 15:25 66 KB Roland B. Wassenberg to previous
9 13-Aug-2017 20:39 65 KB Roland B. Wassenberg to previous | to last
8 17-Mar-2014 00:03 65 KB Roland B. Wassenberg to previous | to last
7 03-Apr-2010 07:28 65 KB Carsten Strotmann to previous | to last
6 03-Apr-2010 07:27 65 KB Carsten Strotmann to previous | to last
5 03-Apr-2010 07:21 18 KB Carsten Strotmann to previous | to last
4 03-Apr-2010 07:18 16 KB Carsten Strotmann to previous | to last
3 03-Apr-2010 07:13 9 KB Carsten Strotmann to previous | to last
2 03-Apr-2010 07:07 4 KB Carsten Strotmann to previous | to last
1 03-Apr-2010 07:07 4 KB Carsten Strotmann to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 169 added 212 lines
{{{
1:PROGRAM KALEIDOSCOPE;
2:VAR I,J,K,W,X:INTEGER;
3:BEGIN
4: MAXGRAPH(19);
5: GRAPHICS(19);
6: X:=0;
7: REPEAT
8: FOR W:=3 TO 50 DO
9: BEGIN
10: FOR I:=1 TO 10 DO
11: BEGIN
12: FOR J:=0 TO 10 DO
13: BEGIN
14: K:=I+J;
15: COLOR(J*3/(I+3)+I*W/12);
16: PLOT(I+8,K);
17: PLOT(K+8,I);
18: PLOT(32-I,24-K);
19: PLOT(32-K,24-I);
20: PLOT(K+8,24-I);
21: PLOT(32-I,K);
22: PLOT(I+8,24-K);
23: PLOT(32-K,I)
24: END
25: END
26: END
27: UNTIL X=99 (* UNENDING LOOP *)
28:END.
A,C,D,E,F,I,L,M,P,Q,S,X,?->I Let's insert a comment
- before line 15.
Line -> 15
--
15: (* MY FIRST EDIT *) Enter the data to be
------------------- inserted when prompted for
16: line 15. Just press RETURN
- when prompted for line 16.
This will terminate insert
mode.
A,C,D,E,F,I,L,M,P,Q,S,X,?->L List again to verify that
- the change was made
correctly.
Line from ->
-
Line to ->
-
1:PROGRAM KALEIDOSCOPE;
2:VAR I,J,K,W,X:INTEGER;
3:BEGIN
4: MAXGRAPH(19);
5: GRAPHICS(19);
6: X:=0;
7: REPEAT
8: FOR W:=3 TO 50 DO
9: BEGIN
10: FOR I:=1 TO 10 DO
11: BEGIN
12: FOR J:=0 TO 10 DO
13: BEGIN
14: K:=I+J;
15: (* MY FIRST EDIT *)
16: COLOR(J*3/(I+3)+I*W/12);
17: PLOT(I+8,K);
18: PLOT(K+8,I);
19: PLOT(32-I,24-K);
20: PLOT(32-K,24-I);
21: PLOT(K+8,24-I);
22: PLOT(32-I,K);
23: PLOT(I+8,24-K);
24: PLOT(32-K,I)
25: END
26: END
27: END
28: UNTIL X=99 (* UNENDING LOOP *)
29:END.
A,C,D,E,F,I,L,M,P,Q,S,X,?->F Let's save the program
- back to disk drive 1
under the same name.
A - Append file
D - Directory list
L - Load file
S - Save file
S
-
Enter filename -> SAMPLE1
-------
A,C,D,E,F,I,L,M,P,Q,S,X,?->X Now let's exit directly to
- the Compiler.
Draper Software
Pascal Compiler
Version 2.1
Copyright 1989
by Norm Draper
Enter Filename:
SAMPLE1 Enter name of program to
------- be compiled. The name of
the last program edited,
compiled, or run will be
filled in by the
Compiler.
Enter List Output Filespec
Default is E: Just press RETURN at this
- point to have the compile
list directed to the
screen.
0000 PROGRAM KALEIDOSCOPE;
0000 VAR I,J,K,W,X:INTEGER;
0003 BEGIN
0003 MAXGRAPH(19);
0017 GRAPHICS(19);
001B X:=0;
001E REPEAT
0022 FOR W:=3 TO 50 DO
002A BEGIN
0035 FOR I:=1 TO 10 DO
003D BEGIN
0048 FOR J:=0 TO 10 DO
004F BEGIN
005A K:=I+J;
0062 COLOR(J*3/(I+3)+I*W/12);
008A PLOT(I+8,K);
0098 PLOT(K+8,I);
00A6 PLOT(32-I,24-K);
00B8 PLOT(32-K,24-I);
00CA PLOT(K+8,24-I);
00DC PLOT(32-I,K);
00EA PLOT(I+8,24-K);
00FC PLOT(32-K,I)
010A END
010A END
010C END
011C UNTIL X=99 (* UNENDING LOOP *)
0142 END.
0147
ADDR NAME
---- --------
0003 I
0004 J
0005 K
0006 W
0007 X
5 Compiler table entries used
*** Program Execution Completed *** Press the SELECT key at
Highest Stack Address Used = $AFF8 this point to take us to
<START>Repeat,<SELECT>Menu,<ESC>Exit the main menu.
DRAPER PASCAL
VERSION 2.1
1 - Run Program
2 - Disk Directory
3 - Compile Program
4 - Edit a Program
5 - Exit to DOS
6 - List a file
7 - Trace on
Copyright 1989
by Norm Draper
1 Select '1' to run the
- program that was just
compiled.
Enter name of program to be run
SAMPLE1 The name of the last
------- program edited, compiled,
or run will be filled in
by the main menu program.
Overtype the name if you
want to run a different
program.
}}}
At this point you should have a nice kaleidoscope pattern being displayed on your television screen. To stop it, press the BREAK key. To repeat execution, press the START key. To return to the main menu, press the SELECT key. To exit to DOS, press the ESC key.
Another program, SAMPLE2, is also provided for you to practice with. It will display Roman numerals for powers of two between 1 and 4096. Compile it, turn on the trace via the main menu, and run it. After it is finished, press CTRL-T to display the trace table, and CTRL-S to display the stack contents. When prompted for 'Where? Filespec', enter 'E:'. For a description of the stack display line, refer to the 'DUMPSTK' command in the 'Pascal Definitions' section of the manual provided to registered users.