You will write a LC-3 program at the machine level, i.e. in binary to determine
ID: 3922567 • Letter: Y
Question
You will write a LC-3 program at the machine level, i.e. in binary to determine the characteristics of a value stored in memory. These are the specifications:The program must be written in LC-3 Machine Language and originate at x3000. Use the LC3Edit program to generate the file and save it as AddBits.bin. The first part of this program determines if the value stored at memory location x3100 is even or odd. If the value is odd, then you will store x0001 in memory location x3101. If the value is even you will store x0000 in memory location x3101. In the next part of this same program you will count the number of 1s in the value at memory location x3100 and store the sum in x3102. You will not change the value stored in memory location x3100. Your code must be well-commented. Use the commenting style for the code given in Fig 5.13, 5.15, and 5.17 in the book. Test the code by hand using the LC-3 simulator with different values at memory location x3100. This is a snapshot of the memory location starting at x3100 after your program runs.
Address Value x3100 xFFFF x3101 x0001 x3102 x0010
You will write a LC-3 program at the machine level, i.e. in binary to determine the characteristics of a value stored in memory. These are the specifications:
The program must be written in LC-3 Machine Language and originate at x3000. Use the LC3Edit program to generate the file and save it as AddBits.bin. The first part of this program determines if the value stored at memory location x3100 is even or odd. If the value is odd, then you will store x0001 in memory location x3101. If the value is even you will store x0000 in memory location x3101. In the next part of this same program you will count the number of 1s in the value at memory location x3100 and store the sum in x3102. You will not change the value stored in memory location x3100. Your code must be well-commented. Use the commenting style for the code given in Fig 5.13, 5.15, and 5.17 in the book. Test the code by hand using the LC-3 simulator with different values at memory location x3100. This is a snapshot of the memory location starting at x3100 after your program runs.
Address Value x3100 xFFFF x3101 x0001 x3102 x0010
You will write a LC-3 program at the machine level, i.e. in binary to determine the characteristics of a value stored in memory. These are the specifications:
The program must be written in LC-3 Machine Language and originate at x3000. Use the LC3Edit program to generate the file and save it as AddBits.bin. The first part of this program determines if the value stored at memory location x3100 is even or odd. If the value is odd, then you will store x0001 in memory location x3101. If the value is even you will store x0000 in memory location x3101. In the next part of this same program you will count the number of 1s in the value at memory location x3100 and store the sum in x3102. You will not change the value stored in memory location x3100. Your code must be well-commented. Use the commenting style for the code given in Fig 5.13, 5.15, and 5.17 in the book. Test the code by hand using the LC-3 simulator with different values at memory location x3100. This is a snapshot of the memory location starting at x3100 after your program runs.
Address Value x3100 xFFFF x3101 x0001 x3102 x0010
Explanation / Answer
solution:
Address Value
x3100 xFFFF
x3101 x0001
x3102 x0010
--------------------------------------------------
This is a snapshot of the memory location starting at x3100 after your program runs.
Address Value
x3100 xAFAF
x3101 xF5F5
Guidelines
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.