Question

Translate HLL statement given below to Assembly for (j = 0; j <= 100; j =...

Translate HLL statement given below to Assembly

for (j = 0; j <= 100; j = j+1)

a = a + c

                              

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

Here eax register will store some value to which ecx will be added 100 times (same as doing a = a + c in HLL).

Firstly eax and ecx are initialized to some values (say 5 and 10 respectively) . Then inside the loop ecx will be added to eax 100 times using cmp.

mov eax,5

mov ecx,10

Loop:

add eax,ecx

cmp ecx,100

jle Loop

ret

Add a comment
Know the answer?
Add Answer to:
Translate HLL statement given below to Assembly for (j = 0; j <= 100; j =...
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