

Task
Produce a graphical or ASCII-art representation of a Peano curve of at least order 3.

100 PROGRAM "PeanoC.bas"
110 OPTION ANGLE DEGREES
120 SET VIDEO MODE 5:SET VIDEO COLOR 0:SET VIDEO X 40:SET VIDEO Y 27
130 OPEN #101:"video:"
140 DISPLAY #101:AT 1 FROM 1 TO 27
150 PLOT 280,240,ANGLE 90;
160 CALL PEANO(28,90,6)
170 DEF PEANO(D,A,LEV)
180   IF LEV=0 THEN EXIT DEF
190   PLOT RIGHT A;
200   CALL PEANO(D,-A,LEV-1)
210   PLOT FORWARD D;
220   CALL PEANO(D,A,LEV-1)
230   PLOT FORWARD D;
240   CALL PEANO(D,-A,LEV-1)
250   PLOT LEFT A;
260 END DEF