uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

sierpinski.tal (364B)


      1 ( uxncli sierpinski.rom )
      2 
      3 @sierpinski ( -> )
      4 	( mask ) [ LIT2r 0a18 ] [ LIT2r 2018 ] 
      5 	( size ) [ LIT2 &size 1001 ] SUB
      6 	&>ver ( -- )
      7 		DUP INCk
      8 		&>pad ( length -- )
      9 			DEOkr
     10 			#01 SUB DUP ?&>pad
     11 		&>fill ( length i -- )
     12 			ANDk DUP2r ?{ POP2r ORA2kr } DEOr DEOkr
     13 			INC ADDk ,&size LDR LTH ?&>fill
     14 		POP2 OVR2r DEOr
     15 		#01 SUB INCk ?&>ver
     16 	POP POP2r POP2r BRK
     17