# This program gets two single-digit numbers, A and B, from the user # Then prints out the numbers A through B 0 LOADI A 1 # Get the number 1 into register A 1 LOADI B 48 # 48 is int value of '0', pseudo-constant 2 IN C 0 # Get starting point in ASCII 3 SUB D C B # Get integer value of input character 4 IN C 0 # Get ending point in ASCII 5 SUB E C B # Convert ending from ASCII to int val # Starting value is D, ending value is E 6 LTE D E # (D <= E) 7 NOT # !(D <= E) --> (D > E) 8 CJMP 13 # If (D > E) from above, exit loop 9 ADD C D B # Convert D as int into ASCII 10 OUT C 15 # Print out the number 11 ADD D D A # Increment D 12 JMP 6 # Go back to the top of the loop 13 HLT