This program draws an illustrated Christmas card featuring a dove of peace, decorative text reading “Season’s Greetings From The… To All Of Our Friends At Christmas,” and a stylized star shape, all rendered using BASIC graphics commands. The artwork is built almost entirely from chained DRAW commands with arc parameters (the third argument to DRAW specifies arc angle in radians), allowing curved lines to form the bird’s wings, body, and feathers. A scaling variable a at line 5001 is used to render a ten-pointed star shape via proportionally scaled DRAW steps. The program ends by drawing repeating candle or tree shapes using a loop with coordinate variables, then adds small circles, before looping back to restart the card display.
Program Analysis
Program Structure
The program is organized into distinct functional segments identified by line number ranges:
- Lines 4–7: Screen setup — black paper/border, red ink, double-rectangle border frame using PLOT/DRAW.
- Lines 10–640: The main bird (dove) illustration, drawn entirely with chained PLOT/DRAW commands including arced curves.
- Lines 650–760: Lettering elements drawn graphically (likely “PEACE” or similar glyphs using arcs).
- Lines 770–1040: PRINT-based text (“ON EARTH”, “SEASONS GREETINGS FROM THE”, etc.) and additional drawn letterforms.
- Line 1045:
PAUSE 200— a timed delay before flashing the Christmas message. - Lines 1050–1096: Flashing PRINT messages for the Christmas greeting.
- Lines 5000–5011: Draws a ten-pointed star using a scale factor
a=.21and proportional DRAW steps. - Lines 6000–6230: Draws repeating vertical shapes (candles or stylized trees) using a loop with variables
A,B,C,Dcontrolling position and iteration count. - Lines 7000–7180: Draws sets of three small circles in two horizontal groups, iterating with counters
KandL; terminates withPAUSE 500: CLS : GO TO 4to restart the card. - Lines 9997–9999: Utility lines for saving and a TS2068
MOVEcommand.
Drawing Techniques
The program makes extensive use of the three-argument form of DRAW: DRAW dx, dy, angle, where the third parameter specifies the arc angle in radians. This allows curves to be drawn without machine code or lookup tables. Angles are expressed as multiples of PI (e.g., .4*PI, .3*-PI), making the intent readable. Straight-line segments use the two-argument form DRAW dx, dy.
The bird is built by starting at a single PLOT point and chaining many DRAW commands, with occasional new PLOT anchor points to begin disconnected strokes for feathers, eye details, and wing markings. CIRCLE is used sparingly (lines 430–460) for the eye area and at line 140 for a small decorative detail.
Star Drawing with Scaling Variable
Lines 5000–5011 use a single scale variable a=0.21 multiplied against fixed proportional offsets to draw a star polygon. This is a clean technique for adjustable-size geometric shapes — changing a would rescale the entire star uniformly. The ten DRAW steps trace the star’s outline from a starting PLOT at (161,133).
Loop Structure for Repeated Shapes
The candle/tree loop (lines 6000–6230) avoids FOR…NEXT and instead uses conditional GO TO to iterate. Variables C and D serve as counters: D counts total iterations (exits at 7 via GO TO 7000), and C triggers a column switch at 4 (jumping A to 240 for a second column). B decrements by 56 each iteration to step downward. This is a common BASIC idiom for loops that need mid-body exits or multiple termination conditions.
Variable Usage
| Variable | Usage |
|---|---|
a | Star scale factor (0.21) |
A, B | X, Y plot position for repeating shapes in section 6000 |
C | Column counter for shape loop (resets at 4) |
D | Total iteration counter for shape loop (exits at 7) |
E, F | Circle center 1 coordinates in section 7000 |
G, H | Circle center 2 coordinates in section 7000 |
I, J | Circle center 3 coordinates in section 7000 |
K | Column counter for circles (switches at 4) |
L | Total iteration counter for circles (exits at 7) |
Notable Techniques and Idioms
- The double-rectangle border (lines 6–7) using DRAW with alternating signs neatly traces two concentric frames in a single unbroken sequence per rectangle.
FLASH 1at line 1050 makes the Christmas greeting blink before being turned off, adding animation without any loop overhead.- Ink color changes (
INK 5at line 10,INK 6at line 775,INK 4at line 6000,INK 2at line 7005) partition the drawing into color zones without using attribute blocks directly. - The
GO TO 4at line 7120 restarts the entire card display, making it a continuous loop suitable for exhibition. - Line 240 contains
REM "WING"as an inline section label — a common documentation practice in long graphics programs of this era. - Line 410 has
REM eyesimilarly marking the eye-drawing section.
Anomalies and Notes
- Line 350 is absent — the sequence jumps from 340 to 360, suggesting a deleted or never-written line with no functional impact.
- Line 1040 contains
DRAW -5,3*-PI— this is a two-argument DRAW where the second argument evaluates to approximately −9.42. This is syntactically valid but likely an intentional very steep downward stroke rather than an arc. - The variable
l(lowercase) at line 7120 andL(uppercase) at line 7031/7101 refer to the same variable on this platform (BASIC is case-insensitive for variable names in this context), so the loop termination check works correctly. - Line 9999 uses
MOVE "CARD.bas",3, a TS2068-specific DOS command for renaming or moving a file, confirming this program targets the TS2068 with an attached storage system.
Content
Source Code
3 REM "TRIMPEACE"
4 FLASH 0
6 PAPER 0: BORDER 0: INK 2: CLS : PLOT 0,0: DRAW 255,0: DRAW 0,175: DRAW -255,0: DRAW 0,-175
7 PLOT 3,3: DRAW 249,0: DRAW 0,169: DRAW -249,0: DRAW 0,-169
10 INK 5: PLOT 48,120
20 DRAW -10,-7,.1*PI
30 DRAW -2,-31,.4*PI: DRAW 4,4
40 DRAW 2,30,.4*-PI
50 DRAW 8,-30,.2*-PI: DRAW 0,-62:
60 DRAW -8,-8,.3*-PI:
70 DRAW 14,14,.5*PI: DRAW 0,62:
80 DRAW -8,28,.25*PI
90 PLOT 45,118: DRAW 8,-27,.2*-PI
100 DRAW 0,-64: DRAW -11,-11,.4*-PI
110 PLOT 36,13: DRAW 30,4,.2*-PI: DRAW 7,-1
120 DRAW 44,7,.2*PI: DRAW -38,-12,.3*-PI
130 DRAW -44,0,.2*PI: DRAW -3,-3: DRAW 40,1,.2*-PI: DRAW 16,2,.2*PI
140 CIRCLE 61,3,1: DRAW 0,90: DRAW 31,50,.45*-PI
150 DRAW 0,-85,.75*-PI: DRAW -50,10,.1*PI:
160 PLOT 94,59: DRAW -50,10,.1*PI
170 PLOT 97,61: DRAW -51,10,.1*PI: DRAW -8,-8
180 PLOT 90,140: DRAW 30,-50,.4*-PI
190 PLOT 88,138: DRAW 30,-53,.4*-PI
200 PLOT 58,110: DRAW 10,20,.4*-PI
210 DRAW -10,20,.4*-PI
220 DRAW -10,-20,.4*-PI
230 DRAW 10,-20,.4*-PI
240 REM "WING"
250 PLOT 91,131: DRAW 9,-15
260 DRAW 0,-15,.4*-PI
270 DRAW -2,-7,.1*PI
280 PLOT 76,127: DRAW 18,-25,.2*PI
290 DRAW 0,-5,.3*-PI
300 DRAW 2,-8,.3*PI
310 PLOT 95,93: DRAW 4,2
320 DRAW 7,-3,-PI
330 DRAW 3,-1: DRAW -3,-1
340 DRAW -4,-4,.3*PI
360 DRAW -20,-6,.5*-PI
370 DRAW -15,-2,.4*PI
380 DRAW -2,2: DRAW 20,7,.1*-PI
390 PLOT 67,78: DRAW 3,-1
400 DRAW 7,4,.1*-PI
410 PLOT 103,93: REM eye
420 PLOT 113,97: DRAW -6,-15
430 CIRCLE 105,79,1
440 CIRCLE 102,76,1
450 CIRCLE 99,73,1
460 CIRCLE 102,80,1
470 PLOT 100,116
480 DRAW -8,-12,.3*PI
490 PLOT 84,110
500 DRAW 7,-24,.4*PI
510 PLOT 91,131: DRAW 1,-9,.4*PI
520 DRAW 6,-8: PLOT 90,124
530 DRAW -1,-6,.5*PI: DRAW 5,-5
540 PLOT 90,117: DRAW -1,-5,.5*PI
550 DRAW 4,-4: PLOT 89,111
560 DRAW -1,-4,.4*PI
570 PLOT 76,127: DRAW -1,-6,.5*PI
580 DRAW 8,-14: PLOT 75,121
590 DRAW -1,-6,.5*PI: DRAW 7,-10
600 PLOT 76,115: DRAW -2,-7,.5*PI
610 DRAW 6,-6:
620 PLOT 75,108: DRAW 2,-9,.4*PI
630 DRAW 5,-2: PLOT 78,98
640 DRAW 8,-8,.5*PI
650 PLOT 115,54: DRAW -6,-7,1.4*PI: REM "E"
651 DRAW 7,-7,1.4*PI
652 PLOT 115,54: DRAW -6,-7,1.3*PI
653 DRAW 7,-7,1.5*PI
654 PLOT 121,52: DRAW 9,3,.5*-PI
655 DRAW 12,-21: DRAW 5,3,.5*PI
660 PLOT 128,56: DRAW 12,-21
670 PLOT 130,50: DRAW -9,-14,.3*PI
680 PLOT 130,50: DRAW -8,-14,.3*PI: DRAW 15,0
690 PLOT 167,52: DRAW 0,-15,1.5*PI
700 PLOT 167,52: DRAW 0,-15,1.53*PI
710 PLOT 187,54
720 DRAW -6,-7,1.4*PI
730 DRAW 7,-7,1.4*PI
740 PLOT 187,54
750 DRAW -6,-7,1.3*PI
760 DRAW 7,-7,1.5*PI
770 PRINT AT 18,15;"ON EARTH"
775 INK 6: FLASH 0
780 PLOT 82,160:
790 DRAW -4,-4,1.5*PI
800 DRAW -5,-5,1.6*-PI
810 PRINT AT 3,11;"EASONS"
820 PLOT 150,160: DRAW -10,0,PI
830 DRAW 0,-10: DRAW 10,0,PI
840 DRAW 0,3: DRAW -4,0
850 PRINT AT 3,19;"REETINGS"
860 PRINT AT 4,15;"FROM THE"
870 PLOT 137,111: DRAW 0,10,.9*-PI
880 DRAW 4,3: DRAW 3,6,.25*PI
900 DRAW 0,-40
910 PLOT 150,97
920 DRAW 0,12: DRAW 4,-3,PI: DRAW 0,-7
930 DRAW 7,0,PI: DRAW 0,7: DRAW 0,-10: DRAW 1,0,.2*PI
940 DRAW 8,10: DRAW 0,-10
950 DRAW 5,10: DRAW 0,-10: DRAW 5,10
960 DRAW 0,-10: DRAW 2,2
970 PLOT 186,132: DRAW 0,-33
980 DRAW 7,0,PI: DRAW -4,7,.25*PI
990 DRAW 4,0
1005 PLOT 197,132: DRAW 0,-36: DRAW 2,0
1010 PLOT 208,107: DRAW -2,-4,1.25*PI
1020 DRAW -3,-7,PI: DRAW 7,2,.65
1030 PLOT 218,107: DRAW 0,-4,.5*PI
1040 DRAW 4,-6,.5*-PI: DRAW -5,3*-PI
1045 PAUSE 200
1050 FLASH 1
1080 PRINT AT 11,19;"TO ALL"
1090 PRINT AT 12,15;"OF OUR FRIENDS"
1095 PRINT AT 13,16;"AT CHRISTMAS"
1096 FLASH 0
1100 GO TO 5000
5000 PLOT 161,133
5001 LET a=.21
5002 DRAW a*12.75,a*-37.5
5003 DRAW a*39,0
5004 DRAW a*-32.25,a*-23.25
5005 DRAW a*12,a*-37.5
5006 DRAW a*-32.25,a*22.5
5007 DRAW a*-32.25,a*-23.25
5008 DRAW a*12,a*37
5009 DRAW a*-32.25,a*22.5
5010 DRAW a*39,0
5011 DRAW a*12.5,a*37.5
5015 FLASH 0
6000 LET A=21: LET B=170: LET C=1: LET D=1: INK 4
6010 PLOT A,B
6020 DRAW -4,-6,.3*PI
6030 DRAW 7,-5,.3*PI
6040 DRAW 0,-9,.75*PI
6050 DRAW 0,-9,.75*PI
6060 DRAW -8,-10,.5*PI
6070 DRAW -8,10,.5*PI
6080 DRAW 0,9,.75*PI
6090 DRAW 0,9,.75*PI
6100 DRAW 8,6,.3*PI
6110 DRAW 0,-4: DRAW -5,-5
6120 DRAW 5,5: DRAW 0,-4: DRAW -4,-4
6130 DRAW 4,4: DRAW 0,-4: DRAW -4,-4
6140 DRAW 4,4: DRAW 0,-4
6150 DRAW -4,-4: DRAW 4,4: DRAW 0,-4
6160 DRAW -4,-4: DRAW 4,4: DRAW 0,-4
6170 DRAW -3,-3: DRAW 3,3: DRAW 0,-3
6180 LET B=B-56
6182 LET D=D+1
6183 IF D=7 THEN GO TO 7000
6190 LET C=C+1
6200 IF C=4 THEN GO TO 6220
6210 GO TO 6010
6220 LET A=240: LET B=170
6230 GO TO 6010
7000 LET K=1
7005 INK 2
7010 LET E=13: LET F=126
7020 LET G=20: LET H=126
7030 LET I=17: LET J=121
7031 LET L=1
7040 CIRCLE E,F,2
7050 CIRCLE G,H,2
7060 CIRCLE I,J,2
7070 LET F=F-56
7080 LET H=H-56
7090 LET J=J-56
7100 LET K=K+1
7101 LET L=L+1
7110 IF K=4 THEN GO TO 7130
7120 IF l=7 THEN PAUSE 500: CLS : GO TO 4
7121 GO TO 7040
7130 LET E=233: LET F=126
7140 LET G=240: LET H=126
7150 LET I=237: LET J=121
7180 GO TO 7040
9997 SAVE "CARD" LINE 3: STOP
9998 STOP
9999 MOVE "CARD.bas",3
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.
