:pushšebpOx401051 :movšesp, šebpSoxc, sespOx8 (Sebp),šeax0x401053 :subOx401056 :movOx401059 :addS0x4, šeaxSearSeax, Oxfffffffc (sebp)Ox40105c :movOx40105I :Ox8 (Sebp), $eaxmovOxc...


A Tul<br>1eave<br>Command line arguments are passed to int main(int argc, char** argv) as arguments<br>argc and argv. You should assume that argc is at ebp+8 and argv is at ebp+12.<br>Ox401050<br><what>:<br>push<br>šebp<br>Ox401051<br><what+1>:<br>mov<br>šesp, šebp<br>Soxc, sesp<br>Ox8 (Sebp),šeax<br>0x401053<br><what+3>:<br>sub<br>Ox401056<br><what+6>:<br>mov<br>Ox401059<br><what+9>:<br>add<br>S0x4, šeax<br>Sear<br>Seax, Oxfffffffc (sebp)<br>Ox40105c<br><what+12>:<br>mov<br>Ox40105I<br><what+15>:<br>Ox8 (Sebp), $eax<br>mov<br>Oxc (sebp), seax<br>Seax, OxffffffE8 (tebp)<br>Ox401062<br><what+18>:<br>imul<br>ょううく、.<br>Ox401066<br><what+22>:<br>mov<br>Oxc (tebp), tedx<br>Ox8 (tebp), teax<br>Ox401069<br><what+25>:<br>mov<br>Ox40106c<br><what+28>:<br>mov<br>Ox40106f<br><what+31>:<br>sub<br>šedx, teax<br>Ox401071<br><what+33>:<br>šeax, Oxfffffff4 (sebp)<br>mov<br>Ox401074<br>Oxfffffff8 (sebp), teax<br>Oxfffffffc (tebp), teax<br>Oxfffffff4 (Sebp), teax<br><what+36>:<br>mov<br>Ox401077<br><what+39>:<br>add<br>Ox40107a<br><what+42>:<br>add<br>Ox40107d<br><what+45>:<br>leave<br>Ox40107e<br><what+46>:<br>ret<br>tebp<br>tesp, tebp<br>Ox401089<br><main>:<br>push<br>Ox40108a<br><main+1>:<br>;くT+UTRU><br>sub<br>לווב<br>mov<br>Ox40108c<br><main+3>:<br>S0x18, šesp<br>S0xfffffff0, tesp<br>$0x0, šeax<br>Ox40108f<br><main+6>:<br>and<br>Ox401092<br><main+9>:<br>mov<br>Ox401097<br>Ox40109a<br><main+14>:<br>seax, Oxfffffff0 (sebp)<br>OxfffffEEO (tebp), $eax<br>mov<br><main+17>:<br>mov<br>Ox40109d<br><main+20>:<br>call<br>Ox401420 < alloca><br>Ox4014b0 < main><br>Oxc (šebp), teax<br>$0x4, šeax<br>Ox4010a2<br><main+25>:<br>call<br>Ox4010a7<br><main+30>:<br>mov<br>Ox4010aa<br><main+33>:<br>add<br>(šeax), šeax<br>šeax, (sesp)<br>Ox4010ad<br><main+36>:<br>mov<br>Ox4010af<br><main+38>:<br>mov<br>Ox4010b2<br><main+41>:<br>call<br>Ox4014d0 <atoi><br>šeax, Oxfffffffc (sebp)<br>Oxc (sebp), šeax<br>$0x8, seax<br>(šeax), teax<br>seax, (tesp)<br>Ox4010b7<br><main+46>:<br>mov<br>Ox4010ba<br><main+49>:<br>mov<br>Ox4010bd<br><main+52>:<br>add<br>Ox4010c0<br><main+55>:<br>mov<br>Ox4010c2<br><main+57>:<br>mov<br>Ox4010c5<br><main+60>:<br>call<br>Ox4014d0 <atoi><br>šeax, OxffffffE8 (Sebp)<br>Oxfffffff8 (Sebp), teax<br>Ox4010ca<br><main+65>:<br>mov<br>Ox4010cd<br><main+68>:<br>mov<br>Ox4010d0<br><main+71>:<br>inc<br>Seax<br>Ox4010d1<br><main+72>:<br>mov<br>seax, Ox4 ($esp)<br>Ox4010d5<br><main+76>:<br>Oxfffffffc (tebp), šeax<br>mov<br>Ox4010d8<br><main+79>:<br>add<br>S0x2, teax<br>Ox4010db<br><main+82>:<br>mov<br>šeax, (sesp)<br>Ox4010de<br><main+85>:<br>call<br>Ox401050 <what><br>šeax, Oxfffffff4 (sebp)<br>Oxfffffff4 (šebp), teax<br>Ox4010e3<br><main+90>:<br>mov<br>Ox4010e6<br><main+93>:<br>mov<br>(šesp)<br>seax, Ox4<br>S0x40107f, (šesp)<br>Ox4010e9<br><main+96>:<br>mov<br>Ox4010ed<br><main+100>:<br>movl<br>Ox4010f4<br><main+107>:<br>call<br>Ox4014c0 <printf><br>Ox401019<br><main+112>:<br>Sox0, teax<br>mov<br>Ox4010fe<br><main+117>:<br>leave<br>Ox4010ff<br><main+118>:<br>ret<br>This program is invoked from the command line as shown:<br>./program 5 7<br>The procedure named what is called from main, and returns to main with the value:<br>1) 11<br>2) 24<br>3) 42<br>4) 66<br>

Extracted text: A Tul 1eave Command line arguments are passed to int main(int argc, char** argv) as arguments argc and argv. You should assume that argc is at ebp+8 and argv is at ebp+12. Ox401050 : push šebp Ox401051 : mov šesp, šebp Soxc, sesp Ox8 (Sebp),šeax 0x401053 : sub Ox401056 : mov Ox401059 : add S0x4, šeax Sear Seax, Oxfffffffc (sebp) Ox40105c : mov Ox40105I : Ox8 (Sebp), $eax mov Oxc (sebp), seax Seax, OxffffffE8 (tebp) Ox401062 : imul ょううく、. Ox401066 : mov Oxc (tebp), tedx Ox8 (tebp), teax Ox401069 : mov Ox40106c : mov Ox40106f : sub šedx, teax Ox401071 : šeax, Oxfffffff4 (sebp) mov Ox401074 Oxfffffff8 (sebp), teax Oxfffffffc (tebp), teax Oxfffffff4 (Sebp), teax : mov Ox401077 : add Ox40107a : add Ox40107d : leave Ox40107e : ret tebp tesp, tebp Ox401089
: push Ox40108a : ;くT+UTRU> sub לווב mov Ox40108c : S0x18, šesp S0xfffffff0, tesp $0x0, šeax Ox40108f : and Ox401092 : mov Ox401097 Ox40109a : seax, Oxfffffff0 (sebp) OxfffffEEO (tebp), $eax mov : mov Ox40109d : call Ox401420 < alloca=""> Ox4014b0 < main=""> Oxc (šebp), teax $0x4, šeax Ox4010a2 : call Ox4010a7 : mov Ox4010aa : add (šeax), šeax šeax, (sesp) Ox4010ad : mov Ox4010af : mov Ox4010b2 : call Ox4014d0 šeax, Oxfffffffc (sebp) Oxc (sebp), šeax $0x8, seax (šeax), teax seax, (tesp) Ox4010b7 : mov Ox4010ba : mov Ox4010bd : add Ox4010c0 : mov Ox4010c2 : mov Ox4010c5 : call Ox4014d0 šeax, OxffffffE8 (Sebp) Oxfffffff8 (Sebp), teax Ox4010ca : mov Ox4010cd : mov Ox4010d0 : inc Seax Ox4010d1 : mov seax, Ox4 ($esp) Ox4010d5 : Oxfffffffc (tebp), šeax mov Ox4010d8 : add S0x2, teax Ox4010db : mov šeax, (sesp) Ox4010de : call Ox401050 šeax, Oxfffffff4 (sebp) Oxfffffff4 (šebp), teax Ox4010e3 : mov Ox4010e6 : mov (šesp) seax, Ox4 S0x40107f, (šesp) Ox4010e9 : mov Ox4010ed : movl Ox4010f4 : call Ox4014c0 Ox401019 : Sox0, teax mov Ox4010fe : leave Ox4010ff : ret This program is invoked from the command line as shown: ./program 5 7 The procedure named what is called from main, and returns to main with the value: 1) 11 2) 24 3) 42 4) 66
Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here