Advanced Microprocessor System Assume the initial values of

Advanced Microprocessor System

Assume the initial values of registers are given in the following form. An assembly program section with PUSH/POP instructions is given below. Find the final values of all registers at the end of the execution of the program section. Stack push and pop push {r1} push {r2, r3, r4} pop {r4, r3, r2} Explain the addressing mode for each of the instruction listed in the table.

Solution

Instruction Addressing Mode MOV R3,#0 Register Addressing Mode: Content of the Memory Location #0 will be copied in Register R3. But no content is provided. Let\'s assume the content of #0 is 02H. Then 02H will be copied in R3. MOV R0, R2 Register Addressing Mode:Content of R3 is copied in Register R0 and thus register R0 will have value of 02H LDR R3, [R0,#240] Load R3 from a word 960 bytes above the address of R0 and increments R0 by 960. STR R2, [R0],#4 Stores a word from R2 to the address of R0 and then increment R0 by 4.
Advanced Microprocessor System Assume the initial values of registers are given in the following form. An assembly program section with PUSH/POP instructions is

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site