Question

Suppose there were no PUSH instruction. Write a sequence of two other instructions that would accomplish...

Suppose there were no PUSH instruction. Write a sequence of two other instructions that would accomplish the same as push eax

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

Write a sequence of two other instructions that would accomplish the same as push eax

Ans:

  • sub esp,4
  • mov [esp],eax

============================================================================================

ESP is known as stack pointer register. it holds 32 bit offset into some location on the stack. ESP always points to top of thr stack.

first instruction decrement the stack pointer esp by 4.

second instruction copy a value eax into the stack location pointed to by the stack pointer esp.

Add a comment
Know the answer?
Add Answer to:
Suppose there were no PUSH instruction. Write a sequence of two other instructions that would accomplish...
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