Question & Answer: What type of logic function is used to mask in bits by forcing them to one? When debugging inline assembly co…..

21. What type of logic function is used to mask in bits by forcing them to one ne assembly code, (global, local, heap) variables cannot be accessed if you set up your own stack frame. 23. The result of a signed word operation (2 bytes) is OxAAO8. Is the sign flag set? (Yes, No) 24. EFlags is copied to eax and you nced to clear the Carry Flag (bit 0) and the Overflow Flag (bit 11). Which hex value should be ANDd with eax to achieve those results without disturbing the other flag bits. Short Answer (65 pts) 25. (25 pts) Given that [ebp+ 8] refers to a parameter named tmpP Ox31C7644 and ebp 0x1883C. push ex eall func1 push eex cail funel a. (10 pts) For each one, show what ecx looks like on the stack after push ecx. CODE A: CODE Stack 0x18B38 b. (10 pts) Assume func I returns an integer and that tmpP is a pointer to a character(char ). Show the C prototype for func1 for both CODE A and CODE B. c. (5 pts) What is the value of esp immediately after the call to funcl before any of that code is executed? 26. (5 pts) What basic operations are performed by a call instruction? 27 (5 pts) What basic operations are performed by a ret instruction? 2017 06-CS 3843 Computer Organization- Final Exam Page 3

What type of logic function is used to mask in bits by forcing them to one? When debugging inline assembly code, (global, local, heap) variables cannot be accessed if you set up your own stack frame. The result of a signed word operation (2 bytes) is 0 times AA08. Is the sign flag set? (Yes, No) EFlags is copied to eax and you need to clear the Carry Flag (bit 0) and the Overflow Flag (bit 11). Which hex value should be AND’d with eax to achieve those results without disturbing the other flag bits. Given that [ebp + 8] refers to a parameter named tmpP = 0 times 31C7644 and ebp = 0 times 1883C. a. For each one, show what ecx looks like on the stack after push ecx. b. Assume func1 returns an integer and that tmpP is a pointer to a character(char *). Show the C prototype for func1 for both CODE A and CODE B. c. What is the value of esp immediately after the call to func1 before any of that code is executed? What basic operations are performed by a call instruction? What basic operations are performed by a ret instruction?

Expert Answer

 

Answer – 21

Don't use plagiarized sources. Get Your Custom Essay on
Question & Answer: What type of logic function is used to mask in bits by forcing them to one? When debugging inline assembly co…..
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS $13/PAGE
Order Essay

To force all the bits to one , bitwise OR operation is used

Here , the mask should be all 1’s to set all the bits to one

As, 1 OR 0 = 1 and 1 OR 1 = 1

Still stressed from student homework?
Get quality assistance from academic writers!