RosettaCodeData/Task/Loops-Continue/Uxntal/loops-continue.uxnatl
2025-06-11 20:16:52 -04:00

31 lines
531 B
Text

%newline { [ LIT2 0a -Console/write ] DEO }
%comma { [ LIT2 ", -Console/write ] DEO }
%space { [ LIT2 20 -Console/write ] DEO }
%MOD ( a b -- a%b ) { DIVk MUL SUB }
|18 @Console/write
|100
#0b01
&loop
DUP print-dec
DUP #05 MOD ?{
newline !&continue }
comma space
&continue
INC GTHk ?&loop
POP2
BRK
@print-dec ( dec -- )
DUP #64 DIV print-num/try
DUP #0a DIV print-num/try
( >> )
@print-num ( num -- )
#0a DIVk MUL SUB [ LIT "0 ] ADD .Console/write DEO
JMP2r
&try ( num -- )
DUP ?print-num
POP JMP2r