Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Computer System The following C program int a = /* insert your answer here */: int b = /* insert your answer here */; int
Computer System
The following C program int a = /* insert your answer here */: int b = /* insert your answer here */; int all_the_money(int x, volatile int *buffer) { printf("You got all the money! "); exit(); } int get_money(int x, volatile int* buffer, int y) { buffer[x] = y; } int main(int argc, char **argv) { int buffer[8]; int money = get_money(a, buffer, b); printf("you got %d ", money); } is compiled to the following: all_the_money: : 48 83 ec 08 : 48 8d 3d df 00 00 00 6b5: e8 b6 fe ff ff 6ba: 48 83 C4 08 6be: C3 sub $0x8,%rsp lea Oxdf (%rip),%rdi # get stdin calla 570 add $0x8, %rsp reta main: 6bf: 6c3: 6c6: 60c: 6d2: 6d7: 6d9 : : 6e5: : 6ef: 6f4: 688: 48 83 ec 28 48 89 e6 8b 15 4c 09 20 00 8b 3d 4a 09 20 00 e8 22 00 00 00 89 C2 48 8d 35 cb 00 00 00 bf 01 00 00 00 b8 00 00 00 00 e8 91 fe ffff b8 00 00 00 00 48 83 c4 28 c3 sub $0x28,%rsp mov %rsp,%rsi mov b,%edx mov a,%edi callq 6f9 mov %eax, %edx lea Oxcb(%rip),%rsi # get stdin mov $0x1,%edi mov $0x0,%eax callq 580 <_printf_chk> mov $0x0,%eax add $0x28,%rsp reta get_money: 6f9: 48 63 ff 6fc: 48 8d 04 be 700: 89 10 702: c3 movslq %edi,%rdi lea (%rsi,%rdi,4),%rax %edx, (%rax) retq mov A) In order to have this program call all_the_money, what should be the value of a in DECIMAL? B) In order to have this program call all_the_money, what should be the value of b Ox6ae Ox6b5 Ox.ba Ox6be Ox6bf Ox6c3 Ox6c6 Ox6cc Ox6d2 ue of Ox6d7 Ox6d9 je of Ox6e0 Ox6e5 Ox6ea Ox6ef Ox6f4 Ox6f8 Ox6f9 Oxfc Ox700 Ox702Step by Step Solution
There are 3 Steps involved in it
Step: 1
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