The problem wants to loop through a decimal from input until the only number left is one. However, once first loop reaches 0 it should beging looping again from first digit minus 1 like this,
Input decimal for loop: 4
Your loop result is: 4321 321 21 1
Or,
Input decimal for loop: 6
Your loop result is: 654321 54321 4321 321 21 1
I now have,
DoWhileLoop:
DoWhileBody:
stdout.put( " I => ", I );
dec( I );
DoWhileTermination:
cmp( I, 0 );
jng DoWhileLoopDone;
jmp DoWhileLoopBody;
DoWhileLoopDone:
Which prints if input is 4,
I => 4 I => 3 I => 2 I => 1
I've tried a nested for loop inside to get the continuity needed but I do not know how to increment it without crashing my computer...help?