================================== Additional exercises in LMC coding ================================== idallen@ncf.ca 1. Translate the following pseudocode algorithm fragment into the LMC mnemonics and data items that make up a complete LMC program: x = 953 while x >= 66 x = x * 2 - 10 endwhile output x My program turned out to be 14 instructions plus 4 data items (3 constants and one variable). Your version may differ slightly. 2. Hand-assemble the mnemonics into LMC numeric codes starting at zero. (Number the instructions; make a label table; generate codes.) 3. Enter the numeric codes into the LMC simulator and run the program. (Note that since the program reads no input and has only one output, you don't need to use NEXT I/O. Just hit GO!) What is the final (only) value output by running the program? (Testing Hint #1: If you change 66 to 953, the output value is 896.) (Testing Hint #2: If you change 66 to 896, the output value is 782.) Hand in: a) The five-column (plus comments) program listing from Step 2. b) The value output by running the program.