Question: 3 Machine Code Using LC 3 Simulator, Write machine code ( 0 s and 1 s ) programs that do the following. Make sure to

3 Machine Code
Using LC3 Simulator, Write machine code (0s and 1s) programs that do the following. Make sure to comment logic of your program by using inline comments. You will be graded on comments. Start each program at x3000.
Write a machine code program that doubles the value in register, R3. If R3 contains 6, it will be 12 after running the program. We will load R3 with different values to test the program directly. Name the program, Double.bin
Write a machine code program that will subtract the contents of registers R4 and R5. The result must be stored in memory at address 3072 as well as register R3. The contents of registers, R4 and R5 must not be changed as a result of the operation. R4 and R5 must be loaded using memory addresses, x3070 and x3071. In other words,
2
your program should read from memory and write to memory using registers. We will test by loading data into the memory locations. Name the program, Subtract.bin
3 Machine Code Using LC 3 Simulator, Write

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!