; Reads in 2 integers a, b and prints all integers from a to b inclusive ; (either in increasing or decreasing order as the case may be). allocate-registers loop done a b test inc li loop loopL li done doneL read a read b li inc 1 sgt test a b ; if a <= b: jeqz test loop ; goto loopL li inc -1 loopL: write a sne test a b ; if a == b: jeqz test done ; goto doneL add a a inc j loop doneL: halt