16. List the 3 types of memory partitions as discussed in class.
17. In which of the 3 types of memory are static variables
stored?
18. There are two things the NOP instruction accomplishes while
doing nothing, list one.
19. Given ecx = 0x0000007B, so cl=0x7B, what is the minimum value
that when added, would set the
OVERFLOW flag?
add cl, __________ ; minimum value to cause OF to be
set
Short Answer (40 pts)
20. (4 pts) Given esp = 0x18F448, what is value of eax after
executing a “pop eax” instruction? What is esp
after executing the pop instruction?
0018FF44 B0 CA CC BE EF BE AD DE eax = __________ esp =
__________
21. (12 pts) Given that [ ebp - 0x14 ] refers to a local variable
named tmpD = 0xDE76A1 and ebp = 0x1288C.
CODE A: CODE B: .
mov ecx, [ebp - 0x14] vs. lea ecx, [ebp – 0x14]
push ecx push ecx
call func1 call func1
a. (4 pts) Briefly describe the difference between the CODE A
instructions and the CODE B instructions.
b. (4 pts) For each one, show what ecx looks like on the stack.
Stack CODE A: CODE B:
0x12880
c. (4 pts) Show the matching C function call for each.
Please Note: You have posted more than one Question. As per HOMEWORKLIB RULES, I have answered the first question. Please Post Separate for other Questions.
Q16. List the 3 types of memory partitions as discussed in class.
Answer)
Memory partitioning is the technique or the system where the memory of the computer or device is partitioned into sections which can be allocated to the programs for their execution. The memory divisions are known as the partitions of the memory. There are 3 types of memory partitions as:
Fixed Partitioning - Fixed partitioning means dividing the memory into fixed sizes and the process of the programs can be loaded into the memory blocks of fixed or else greater than the size, thus fixed partitioning occurs and the space left behind unutilized is known as fragmentation space.
Variable Partitioning - Variable partitioning is the process of variably dividing the memory into many sizes such as the memory is divided into non overlapping variable partitions. The large programs fit in large partitions while smaller ones in smaller.
Dynamic Partitioning - Dynamic Partitioning is the division of the partitioning of the memory where the size of the partition is not declared initially but is set at the time when the process is to be loaded into the memory. Thus each partition will be equal to the accommodate the size of the process/program. This way the fragmentation loss can be avoided.
16. List the 3 types of memory partitions as discussed in class. 17. In which of...
Exercise 3 [Conditionals] Consider the following assembly code for a function F3 with two integer arguments: F3: push EBP mov EBP, ESP mov EDX, DWORD PTR [ebp+12] mov EAX, DWORD PTR [ebp+8] cmp EAX, EDX # setup stack #if # goto .L1 #EAX- mov EAX, EDX # ignore for now mov DWORD PTR [EBP-4], EAX mov ESP, EBP pop EBE ret # cleanup stack To the right of each instruction, show the contents of the register whose value changes as...
Below is the disassembled code. PLease help me to defuse the binary bomb phase_4 so the right input should be 6 numbers with a certain pattern 08048cdb <phase_4>: 8048cdb: 53 push %ebx 8048cdc: 83 ec 38 sub $0x38,%esp 8048cdf: 8d 44 24 18 lea 0x18(%esp),%eax 8048ce3: 89 44 24 04 mov %eax,0x4(%esp) 8048ce7: 8b 44 24 40 mov 0x40(%esp),%eax 8048ceb: 89 04 24 mov %eax,(%esp) 8048cee: e8 11 07 00 00 call 8049404 <read_six_numbers> 8048cf3: 83 7c 24 18 00 cmpl...
Assembly Code may I get an explanation for the 3 parts in this question Given that . Ar is a label at address 510 EAX has the value 139 . EBX has the value 102 Which bytes in memory will be accessed by the instruction movl $Ar + 38, %ecx Write your answer in the form startByteEndByte with no space in between. If memory is NOT accessed write -1 for your answer. For example, if your answer was bytes 527...
Need help on Assembly language 1.Solve the following conditions: A. Suppose AL contains 11001011 and CF = 1. Give the new contents of AL after each of the following instructions is executed. Assume the above initial conditions for each part of this question. a. SHL AL,1 b. SHR AL,1 c. ROL AL,2 d. ROR AL,3 e. SAR AL,2 f. RCL AL,1 g. RCR AL,3 B. Suppose EAX contain ABCDH. Show the contents of BX and CX after...
LC-3 Programming Help!! The Stack Protocol The following outline is the protocol for passing arguments to a function and returning values. Everything is stored on the runtime stack so that space is used only when the function is executing. As a result the actual address of arguments and locals may change from call to call. However, the layout of the stack frame (activation record) is constant. Thus, the offests from the frame pointer (FP) to the parameters/locals are constant. All...