Please fill out the code in the blanks of the following C code int main() { int a[10]; int i; for { } } so that it gener
Posted: Sun May 15, 2022 9:59 am
Please fill out the code in the blanks of the following C code int main() { int a[10]; int i; for { } } so that it generates the following assembly code. main: pushl %ebp movl %esp,%ebp subl $44,%esp //hint: allocate space for a andi pushl%esi movl $10,-44%ebp) //hint: try to identify what is stored at -44%ebp) first. .L2: cmpl $0,-441%ebp) jle.L3 movl -44%ebp),%esi movl%esi,%eax decl %eax movl %eax,-40%ebp,%esi,4) decl -44%ebp) jmp.L2 .L3: leal -48%ebp),%esp popl%esi leave ret