Answered step by step
Verified Expert Solution
Question
1 Approved Answer
, you need to create an assembly program in uVision to modify individual bits of a value, then store that value into memory. Fill
, you need to create an assembly program in uVision to modify individual bits of a value, then store that value into memory. Fill in the blanks/comment area of the code outline below, adding your own comments. Note that I'll be referring to the individual bits of this as C7 C6 C5 C4 C3 C2 C1 Co with 7 being the most significant bit as 0 being the least significant bit) Test this program with two different bytes for Control. Take a screenshot after each test of the full uVision window in debug mode after stepping through the entirety of your code (with the Memory Window set to address 0x20000000). Make sure the value for Control is visible in the code window so we can see both it and the final result of Status in the memory window all in the same screenshot. Place both screenshots in a PDF then submit this to Canvas. Also submit to Canvas your code as a .s or .txt file Do not use a zipped folder. Canvas will let you upload two documents as a single submission. Uncommented code will receive a zero. The comments I put in as instructions don't count; you need to add your own comments as well to explain what you're doing. If you have difficulty getting your code to run, make sure to check the PDF of frequent errors on Canvas. You can scroll up in the Build Output window to see what's causing the code to not build. If you cannot find the answers there, send a screenshot with your question to both Nabid and I. Hints: You'll still need a b. at the end of the code you've written. The space directive allocates a labeled spot in memory with blank/0x00 bytes AREA RESET, CODE THUMB ENTRY Main here) ; start with all zeroes in a register of your choosing. This ; register (Rx) will be modified throughout the code and eventually ; stored in memory ; read in the byte labeled Control. ; if C7 is set, set bit 2 of Rx ; if c5 is set AND C4 is clear, set bits 5, 3, and 1 of Rx ; if C3 is clear, toggle bit 1 of Rx ; if c7 OR C2 is set, set bit 6 of Rx ; if co is clear, set bits 7 and 4 of Rx ; I accidentally had the above as C8, which was a typo ; if C1 is equal to bit 1 of Rx, set bit 0 of Rx (don't change bit 1. ; store Rx into the byte labeled Status b. Control dcb 0x00 ; you'll need to change this to other values to test your code AREA HW7, DATA
Step by Step Solution
There are 3 Steps involved in it
Step: 1
assembly AREA RESET CODE THUMB ENTRY Main MOV R0 0 Initialize R0 register with all ze...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started