Question

Consider the program below The initial value of the Stack Pointer ESP = 0018 FF8C. What...

Consider the program below The initial value of the Stack Pointer ESP = 0018 FF8C. What is the value of the STACK POINTER (ESP) after each CALL instruction and each RET instruction below. INCLUDE Irvine32.inc .DATA .CODE main PROC mov ax,val1 call proc1 (1) ESP=____________(After the CALL) nop exit main ENDP proc1 PROC ;Begin Procedure nop call proc2 (2) ESP=____________(After the CALL) nop ret (3) ESP=____________(After the RET) proc1 ENDP proc2 PROC ;Begin Procedure nop call proc3 (4) ESP=___________(After the CALL) ; nop ret (5) ESP=____________(After the RET) proc2 ENDP proc3 PROC ;Begin Procedure nop nop ret (6) ESP=____________(After the RET) proc3 ENDP END Question 1 options: (1) 0018FF88 (2) 0018FF80 (3) 0018FF84 (4) 0018FF84 (5) 0018FF80 (6) 0018FF8C (1) 0018FF88 (2) 0018FF80 (3) 0018FF84 (4) 0018FF80 (5) 0018FF88 (6) 0018FF8C (1) 0018FF88 (2) 0018FF80 (3) 0018FF84 (4) 0018FF84 (5) 0018FF80 (6) 0018FF8C (1) 0018FF88 (2) 0018FF84 (3) 0018FF8C (4) 0018FF80 (5) 0018FF88 (6) 0018FF84 (1) 0018FF88 (2) 0018FF80 (3) 0018FF84 (4) 0018FF88 (5) 0018FF84 (6) 0018FF8C

Homework Answers

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
6. (True/False): The RET instruction pops the top of the stack into the instruction pointer. 8....
6. (True/False): The RET instruction pops the top of the stack into the instruction pointer. 8. (True/False): In protected mode, each procedure call uses a minimum of 4 bytes of stack space. 1. Which instruction pushes all of the 32-bit general-purpose registers on the stack? 20. What values will be written to the array when the following code executes? .data array DWORD 4 DUP(0) .code main PROC mov eax,10 mov esi,0 call proc_1 add esi,4 add eax,10 mov array[esi],eax INVOKE...
7. (True/False): Nested procedure calls are not permitted by the Microsoft assembler unless the NESTED operator...
7. (True/False): Nested procedure calls are not permitted by the Microsoft assembler unless the NESTED operator is used in the procedure definition. 15. What will be the final value in EAX after these instructions execute? push 5 push 6 pop eax pop eax 3. Which instruction pops the stack into the EFLAGS register? 17. Which statement is true about what will happen when the example code runs? 1: main PROC 2: mov eax,30 3: push eax 4: push 40 5:...
13. (True/False): The register list in the USES directive must use commas to separate the register...
13. (True/False): The register list in the USES directive must use commas to separate the register names. 11. (True/False): The USES operator lets you name all registers that are modified within a procedure. 2. Which instruction pushes the 32-bit EFLAGS register on the stack? 18. Which statement is true about what will happen when the example code runs? 1: main PROC 2: mov eax,40 3: push offset Here 4: jmp Ex4Sub 5: Here: 6: mov eax,30 7: INVOKE ExitProcess,0 8:...
In assembly masm use the code below! Write a program that reverse a string using indirect...
In assembly masm use the code below! Write a program that reverse a string using indirect addressing (may not use the stack - push/pop). The string will be given by the user and be up to 64 characters long INCLUDE Irvine32.inc INCLUDE macros.inc MAX = 64 .data source BYTE MAX DUP('#'),0 destination BYTE LENGTHOF source DUP('*'),0 actual_length DWORD ? ask BYTE "Enter a String: ",0 .code main proc ; ask user for input mov edx, OFFSET ask call WriteString ;...
Use STACK for storing the return address for a procedure return of the following program given...
Use STACK for storing the return address for a procedure return of the following program given below. Show the contents of stack following each CALL and RETURN instructions: Main Program Memory Address Instructions 6000H ----- 6050H CALL Proc 1 ---- 6080H CALL Proc 2 END Procedure 1 Memory Address Instructions 5000H --- 5060H CALL Proc 2 RETURN Procedure 2 Memory Address Instructions 2000H --- 2030H CALL Proc 3 ----- RETURN Procedure 3 Memory Address Instructions 3000H RETURN …..
A) Is the code below secure? Explain your rationale. ExitProcess PROTO .data firstval qword 20002000h secondval...
A) Is the code below secure? Explain your rationale. ExitProcess PROTO .data firstval qword 20002000h secondval qword 11111111h thirdval qword 22222222h sum qword 0 .code main proc      mov rax,firstval                         add rax,secondval             add    rax,thirdval      mov    sum,rax      mov    ecx,0      invoke ExitProcess main endp end main b) Transmitted messages often include a parity bit, whose value is combined with a data byte to produce an even number of 1 bits. Suppose a message byte in the AL...
Write a sequence of two instructions that copies bits 0-5 from AL to bits 0-5 in...
Write a sequence of two instructions that copies bits 0-5 from AL to bits 0-5 in BL. Bits 6-7 in BL should be cleared, and AL should be unchanged             Mov al, bl       And 00111111, bl       Write a sequence of two instructions that copies the integer in bits 4-7 from AL register into bits 0-3 of the BL register. Upper 4 bits of AL and BL will be cleared             Shr al, 4       Mov bl,...
Section 2: Using the MARS or SPIM simulator develop a program that will implement the following...
Section 2: Using the MARS or SPIM simulator develop a program that will implement the following conditional statement. If ( n is even) { n = n / 2; } else { n = 3 * n + 1; } In this case, n is to be input by the user (assume they input a non-negative value), the conditional is performed, and the resulting n is to be output. Again, use the system calls for input, output, and exiting the...
program has to be written in X86 processor assy language. Write a program that find the...
program has to be written in X86 processor assy language. Write a program that find the minimum number of coins that can represent an amount of money under $1. The amount of money is a random number between 0 and 99 (cents). The randomRange procedure is used to get a random number. Review the sample code in lab4.asm and run it to see how randomRange works. Each time randomRange is called, it creates a random number between 0 and the...
Question1 At the beginning of a procedure in Assembly, right after it is called, which of...
Question1 At the beginning of a procedure in Assembly, right after it is called, which of the following will work to put the value of the 7th argument into %rax? movq (%rsp), %rax movq 8(%rsp), %rax leaq (%rsp), %rax leaq 8(%rsp), %rax Question2 Given the following code: question2 Address: Instruction 400510: mov %rsp,%rdi 400513: callq 4004cd <sum> 400518: add $0x28,%rsp When the callq instruction executes, what value will be pushed on to the Stack by call? Question3 Given this following...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT