Question: PROGRAM 2 : WRITE THIS IN ARM ASSEMBLY LANGUAGE CODE! To exercise the logical operations, write a program that works with three one - byte

PROGRAM 2: WRITE THIS IN ARM ASSEMBLY LANGUAGE CODE!
To exercise the logical operations, write a program that works with three one-byte data
variables labeled STATUS, CONTROL and PERIPH. The program is to perform the following
operations.
Force bits 2 and 5 of CONTROL to 1, without changing the other 6 bits.
Force bits 3 and 4 of CONTROL to 0, without changing the other 6 bits.
If bit 0 of STATUS is 1, complement bit 7 of CONTROL, otherwise no change to
CONTROL.
Replace bits 5-2 of PERIPH with the 4-bit hex digit 5, without changing the other
four bits of PERIPH.
Data are stored in "little endian" format (bits are numbered 7 down to 0, from left to
right, within each byte.)
Test the program by initializing CONTROL to the value 03C, STATUS to 00F, and
PERIPH to 0x77. Display these values as hexadecimal bytes (type char) in an Expressions
View and capture that view to show the values of CONTROL, STATUS, and PERIPH at the
end of the program.
Then, without leaving the debugger, reset the CPU, change the values of CONTROL to
0xC3,STATUS to 0xFO, and PERIPH to 0xB5. Run the program and capture the
Expressions View to show the values of the three variables at the end of the program.
Submit your source code and the two Expressions Views.
PROGRAM 2 : WRITE THIS IN ARM ASSEMBLY LANGUAGE

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!