Alivehyperfish/examples
Jump to navigation
Jump to search
Decimal I/O
Input
ff:qddddddddiiz|======>dddddddddddddddibb:z|>dddddddiifiib<|:f:z|>dddddddiibiiiiif<|:f:z|>dddddddiibbiff<|:<======|:bb
Compiled from
> > lbl di input -10 if0 goto di_exit -38 < < lbl di_x2 if0 goto di_x2_exit -7 > +14 < goto di_x2 lbl di_x2_exit > lbl di_x5 if0 goto di_x5_exit -7 < +35 > goto di_x5 lbl di_x5_exit > lbl di_add if0 goto di_add_exit -7 < < +7 > > goto di_add lbl di_add_exit goto di lbl di_exit < <
Output
:z|===>:l|>z|=>ddddddddiifiddb<|:iiiiddddddfdddddiib:iiiiiiiiidddddf<===|:b:z|>ob<|:
Compiled from
lbl do_ml if0 goto do_ml_exit lbl do_div if<0 goto do_div_tm if0 goto do_div_exit -10 > +1 < goto do_div lbl do_div_tm +10 > -1 < lbl do_div_exit +48 > goto do_ml lbl do_ml_exit < lbl do_to0 ifzero goto do_to0_exit print < goto do_to0 lbl do_to0_exit
A+B problem
Positive number 0~315 only.
; Input to cell 1 ; ff:qddddddddiiz|======>dddddddddddddddibb:z|>dddddddiifiib<|:f:z|>dddddddiibiiiiif<|:f:z|>dddddddiibbiff<|:<======|:b ; Input to cell 2 ; ff:qddddddddiiz|======>dddddddddddddddibb:z|>dddddddiifiib<|:f:z|>dddddddiibiiiiif<|:f:z|>dddddddiibbiff<|:<======|:bb ; Add cell 2 to cell 1 ; :z|>dddddddiibif<|:b ; Print result ; :z|===>:l|>z|=>ddddddddiifiddb<|:iiiiddddddfdddddiib:iiiiiiiiidddddf<===|:b:z|>ob<|: