Goals:

This programming challenge will show you how to

·       to use ideas realized in programming the LC-Three machine;

·       to jot down ML function and knowledge motion directions ONLY;

·       to make use of LC3Edit for program enhancing; and

·       to make use of LC-Three Simulator to debug and execute a program.

 

Description:

For this programming challenge, you’ll write an LC-Three ML program that may convert ASCII decimal characters saved in reminiscence, to their corresponding two’s complement representations. After conversion, the values might be added and the outcomes saved in reminiscence.

 

Specifics:

  •      Your program must be written in LC-Three machine language. You could write the directions both in binary or hexadecimal kind.
  •      Load your program in reminiscence tackle x3000.
  •      Assume that the ASCII illustration of a two-digit decimal worth is saved in a single reminiscence location the place bits [15:8] comprise the tens digit worth and bits [7:0] comprise those digit worth. For instance, 0011 0011 0011 0100 represents the ASCII digits ‘Three’ and ‘four’, which represents the decimal quantity 34.
  •      Assume that two (2) two-digit ASCII values are saved in addresses x3101 and x3102. Convert every to its decimal values, add the values and retailer the sum in reminiscence tackle x3100.
  •      Overwrite the saved ASCII values with the transformed decimal values in reminiscence.

Instance:

Deal with Preliminary Contents Outcomes
x3100 undefined 62 = 0000 0000 0011 1110 (sum)
x3101 ‘24’ = 0011 0010 0011 0100 24 = 0000 0000 0001 1000
x3102 ‘38’ = 0011 0011 0011 1000 38 = 0000 0000 0010 0110

 EC +5points: Use all three addressing modes at the very least as soon as.

Published by
Essays
View all posts