2. A program to get the user to enter an integer less than 10 (repeats until a valid response is
given- simple loop)
/ program to get int < 10 from user
/ keep reading til valid value obtained
org 100 / get value for x
NewVal, input
store X
subt TooBig / compute x - toobig
skipcond 000 / if negative then x ok (less than toobig)
jump NewVal / otherwise go back and try again
Show, load X / got valid value, print x, then done
output
halt
X, dec 0 / default value for x
TooBig, dec 10 / X must be less than this