Question: As shown below, main ( ) passes char a , char b , char c , char d , int e , and short f
As shown below, main passes char achar bchar cchar dint e and short f to func Assume that SP points to $ Fill the CPU register and stack contents when func was just called.
#include
using namespace std;
void func char param char param char param char param int param short param entry address @xA
char x xAB;
char y xCD;
;
char a x;
char b x;
char c x;
char d x;
int e xABCDEF;
short f xABCD;
int main
func a b c d e f ; encoded into @Address x BL FUNC @xA
BL is a bit encoded instruction. THUMBs LSB is
CPU registers
R
R
R
R
R
R
R
R
R
R
R
R
R
SP
LR
PC
Memory
x
xFF
xFE
xFD
xFC
xFB
xFA
xF
xF
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
