Question

Assembly Memory Segment Layout (Little Endian) - What does the "add" instruction do?

For example, on the first add instruction (add eax, 3), it moves the pointer for eax 3 spots to the right.

Thus, EAX = 12, 17, A3, 00. (This I understand)

But, on the second add instruction (add ebx, 5), it actually adds the value 5 to ebx, making EBX = 12, 17, A3, 05.

Why is that?

varl var2 var3 dd 179 db 0A3h, 017h 012h bca var1 eax. mov add eax, mov ebx r [eax] add ebx 5 mov [varlj ebx B3 00 00 00 A3 17 12 62 63 61 var1 Va Va (4) (3) (3)

ANSWER:

varl var2 var3 dd 179 db 0A3h, 017h 012h bca var1 eax. mov add eax, mov ebx r [eax] add ebx 5 mov [varlj ebx B3 00 00 00 A3 17 12 62 63 61 var1 Va Va (4) (3) (3)

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

(3 AS we ouw en firs t add instruction (adoleAX ,3) t Moves -to Pointer for eax3 spots t the γί0ht Lu d adds te value 5 to e

answered by: ANURANJAN SARSAM
Add a comment
Know the answer?
Add Answer to:
Assembly Memory Segment Layout (Little Endian) - What does the"add" instruction do?For example, on...
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
  • 1. Assume that you are given values in eax, ebx, ecx. Write an assembly code that...

    1. Assume that you are given values in eax, ebx, ecx. Write an assembly code that does the following: eax = (ecx + edx ) - (eax + ebx) 2. Write a piece of code that copies the number inside al to ch. Example: Assume that Initially eax = 0x15DBCB19. At the end of your code ecx = 0x00001900. Your code must be as efficient as possible. 3. You are given eax = 0x5. Write one line of code in...

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