;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; We implement this python program: ;; ;; def printRange(l, u): ;; for i in range(l, u+1): ;; print(i) ;; ;; l = input() ;; u = input() ;; printRange(l, u) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; allocate-registers l u one start test range cont read l read u li cont after-callL li range rangeL j range after-callL: halt ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Print all integers between l and u inclusive ;; Registers: ;; l the lower bound (will be clobbered) ;; u the upper bound ;; cont the return address ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; rangeL: li one 1 li start startL startL: sle test l u jeqz test cont write l add l one l j start