RosettaCodeData/Task/Integer-sequence/Uxntal/integer-sequence.uxnatl

24 lines
366 B
Plaintext

%comma { [ LIT2 ", -Console/write ] DEO }
%space { [ LIT2 20 -Console/write ] DEO }
|18 @Console/write
|100
#0001
&loop
DUP2 print/dec comma space
INC2 !&loop
BRK
@print/dec ( short* -- )
#000a SWP2 [ LITr ff ]
&get
SWP2k DIV2k MUL2 SUB2 STH
POP OVR2 DIV2 ORAk ?&get
POP2 POP2
&put
STHr INCk ?{ POP JMP2r }
[ LIT "0 ] ADD .Console/write DEO !&put