diff --git a/projects/examples/demos/hilbert.tal b/projects/examples/demos/hilbert.tal new file mode 100644 index 0000000..fbbda32 --- /dev/null +++ b/projects/examples/demos/hilbert.tal @@ -0,0 +1,105 @@ +|00 @System &vector $2 &wst $1 &rst $1 &eaddr $2 &ecode $1 &pad $1 &r $2 &g $2 &b $2 &debug $1 &halt $1 +|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 + +|00 + + @line &x2 $2 &y2 $2 + +|0100 + + #aff5 .System/r DEO2 + #af00 .System/g DEO2 + #af05 .System/b DEO2 + ( screen size ) + #0140 .Screen/width DEO2 + #0140 .Screen/height DEO2 + + #03ff #0000 + &l + STH2k INC2k d2xy STH2r d2xy #01 draw-line + INC2 GTH2k ?&l + POP2 POP2 + +BRK + +@d2xy ( d* -- x* y* ) + + ,&t STR2 + #0000 + DUP2 ,&x STR2 + ,&y STR2 + + ( N ) #0020 #0001 ( for i=1; i