gra 01 06 .pdf
File information
Original filename: gra-01-06.pdf
This PDF 1.4 document has been generated by Writer / OpenOffice 4.1.1, and has been sent on pdf-archive.com on 08/05/2016 at 20:43, from IP address 87.175.x.x.
The current document download page has been viewed 280 times.
File size: 32 KB (1 page).
Privacy: public file
Share on social networks
Link to this file download page
Document preview
A6) a)
int a;
void do_something(){
switch (a){
case 6:
shutdown();
break;
case 5:
goodbye();
case 4:
wind_down();
case 2:
wind_up();
break;
case 1:
welcome();
case 0:
init();
default:
failure();
}
return;
}
b)
do_something: ;we assume the value of 'a' is stored in eax
cmp 6, [eax]
je L6
cmp 5, [eax]
je L5
cmp 4, [eax]
je L4
cmp 3, [eax]
je L3
cmp 2, [eax]
je L2
cmp 1, [eax]
je L1
cmp 0, [eax]
je L0
j Ldefault
L1:
welcome()
L0:
init()
L2:
wind_up()
goto Lend
L4:
wind_down()
L5:
goodbye()
L6:
shutdown()
goto Lend
Ldefault:
failure()
Lend:
ret

Link to this page
Permanent link
Use the permanent link to the download page to share your document on Facebook, Twitter, LinkedIn, or directly with a contact by e-Mail, Messenger, Whatsapp, Line..
Short link
Use the short link to share your document on Twitter or by text message (SMS)
HTML Code
Copy the following HTML code to share your document on a Website or Blog