Question: NOTE: This program should work in LC 3 Edit and LC 3 Simulator for Windows At the machine level, programs are sequences of bits that

NOTE: This program should work in LC3Edit and LC3 Simulator for Windows
At the machine level, programs are sequences of bits that are interpreted by the computer to
perform some computation. In this Machine Problem (MP) you will construct a LC-3 program at
the machine level to determine some characteristics of a value stored in memory.
Procedure:
Part1 Memory read/write operation
1. In the ISA of the LC-3, memory address space is 16 bits that correspond to 216 locations,
each containing one word (16 bits). Addresses are used to identify memory locations
and memory-mapped I/O devices registers. Addresses are numbered from 0(x0000) to
65536(xFFFF).
x0000
Trap Vector Table
x00FF
x0100
Interrupt Vector Table
x01FF
x0200
Operating system and
x02FF Supervisor Stack
x0300
Available for
user programs
xFDFF
xFE00
Device register addresses
xFFFF
2. Write a simple LC-3 program to perform the following operations. Store your Machine
Language program originate at x3000.
3. You can set the value of memory location x3100 before you run your program on the LC-
3 simulator. On UNIX machines (Sun, Linux) you can do this by using the "Set Values"
option on the menubar and selecting the "Set Register or Memory" option. On Windows
machines, you can click on "Simulate" in menubar and select "Set Value". Instead, you
can just press F4 and the "Set Value" dialog box will pop up. Do not overwrite the
original value in x3100 in any following steps unless otherwise mentioned.
4. First, determine if the content of memory location x3100 is even or odd Store x0001 in
memory location x3101 if it is odd, or x0000 if it is even.
5. Next, count the number of 1s in memory location x3100 and store the count in x3102.
Notes and Suggestions:
The first line of your programs must specify the memory address of the first instruction of
your program. LC-3 simulator will place your program starting at that address. For this
assignment, you should place your program starting at x3000(the first line of your
program should contain the bit pattern 0011000000000000).
If you are using a Windows machine, use the LC3Edit program to type in your programs.
On Sun and Linux workstations, pico, emacs, and vi are several of the text editors you
can use. Your program file needs to be in plain text format.
Lab report:
Your report should include all information required to be noted in the procedure, any
problems/issues you encountered during the lab and how did you resolve them. At the machine level, programs are sequences of bits that are interpreted by the computer to perform some computation. In this Machine Problem (MP) you will construct a LC-3 program at the machine level to determine some characteristics of a value stored in memory.
Procedure:
Part1- Memory read/write operation
1. In the ISA of the LC-3, memory address space is 16 bits that correspond to \(2^{16}\) locations, each containing one word (16 bits). Addresses are used to identify memory locations and memory-mapped I/O devices registers. Addresses are numbered from 0(x0000) to 65536(XFFFF).
2. Write a simple LC-3 program to perform the following operations. Store your Machine Language program originate at \( x 3000\).
3. You can set the value of memory location \(\times 3100\) before you run your program on the LC3 simulator. On UNIX machines (Sun, Linux) you can do this by using the "Set Values" option on the menubar and selecting the "Set Register or Memory" option. On Windows machines, you can click on "Simulate" in menubar and select "Set Value". Instead, you can just press F4 and the "Set Value" dialog box will pop up. Do not overwrite the original value in x3100 in any following steps unless otherwise mentioned.
4. First, determine if the content of memory location \( x 3100\) is even or odd Store x0001 in memory location x3101 if it is odd, or x0000 if it is even.
5. Next, count the number of 1 s in memory location \( x 3100\) and store the count in \(\times 3102\).
Notes and Suggestions:
- The first line of your programs must specify the memory address of the first instruction of your program. LC-3 simulator will place your program starting at that address. For this assignment, you should place your program starting at \(\mathbf{x 3000}\)(the first line of your program should contain the bit pattern 0011000000000000).
- If you are using a Windows machine, use the LC3Edit program to type in your programs. On Sun and Linux workstations, pico, emacs, and vi are several of the text editors you can use. Your program file needs to be in plain text format.

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!