Question

provide na example of  x86 assembly instruction simulation that involves %esp, %ebp, and %eip machine registers

provide na example of  x86 assembly instruction simulation that involves %esp, %ebp, and %eip machine registers

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The subroutine attached below performs the following actions:

  • saving a copy of the stack pointer in the base pointer (EBP)
  • allocating local variables by changing the stack pointer
  • saving register values on the stack

/*Start the code section/ .text /Define myFunc as a global (exported) function. */ globl myFunc type myFunc, @function myFunc

myFunc is a label and so elsewhere in the code, we can refer to its memory location using the more convenient symbolic name instead of expressing the location in its 32-bit value. This causes the EIP register to update implicitly by the provided control flow instructions. It cannot be manipulated directly therefore it is not mentioned in the code explicitly.

Add a comment
Know the answer?
Add Answer to:
provide na example of  x86 assembly instruction simulation that involves %esp, %ebp, and %eip machine registers
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT