Machine Language Lab


I have provide some insight into ML lab part A.  There are two parts to the lab 1 that can be solved separately and then brought together after each has proven to work successfully.  In chp 6 we discussed how to organize machine code based on three programming constructs: sequential, conditional, and iterative.  You should use these constructs to develop a flowchart of your program.  The flowchart for part A has been provided here.

From the flowchart you can use the corresponding ML code segments from page 158 to help in organization of the code.  Please see the attached graphic for an example.

Don’t forget to test your code.  You use LCEdit to enter your binary (machine langauge) code. Create an object file *.obj by selecting the b ->.  If there are no errors then you test your code in the LC3Simulator.  Load the code.  Place a break point at the HALT command (trap 37).  Edit the value at location x3031 to make it an odd number using “set value”. Step through the code line by line to ensure that it is executing properly.  If you get the right answer for an odd value try an even value.


Good Luck….


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: