Question

Can someone explain how to get the answer to these two questions please? This is a review for school.

; code fragment V Use this information and the code at the right to answer questions # 20-21. mov edx, OFFSET string mov ecx , MAXSIZE dec ecx call Readstring mov ecx, eax ; number of Given the following declarations for an IA-32 processor MAXSIZE 10 data ; digits entered ;initialize val string BYTE MAXSIZE DUP (?) mov val,0 mov esi, OFFSET string cld DWORD? val The ReadString procedure accepts the address of the memory destination in edx, and the maximum number of characters to read in ecx. ReadString stores the users input characters in the memory destination, and the actual number of characters in eax. The ASCII code for character 0 is 48 Suppose that the user enters the string 5738 (without the quotes) when the ReadString procedure is called. top: mov eax, 0 lodsb sub eax,48 mov ebx, eaix moveax, val mov edx,10 mul edx add eax,ebx movVal,eax loop top 20. (3 pts) What is displayed? done mov eax, va.l cali Wr1teDec 21 What is stored in memory at val? A. 0x5 0x7 0x3 0x8 B. 0x8 0x3 0x7 0x5 C. 0x6A 0x16 0x0 0x0 D. 0x0 0x0 0x16 0x6A E. none of the above

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

20) Answer: - 5738 21) Answer: - C

Add a comment
Know the answer?
Add Answer to:
Can someone explain how to get the answer to these two questions please? This is a...
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
  • X86 Assembly Language Help to implement the CipherChar Procedure at the end of the given code...

    X86 Assembly Language Help to implement the CipherChar Procedure at the end of the given code INCLUDE Irvine32.inc         .data       KeyPrompt BYTE "Enter the passphrase: ",0       TextPrompt BYTE "Enter the plaintest: ",0           str1 BYTE "The passphrase has length:",0           str2 BYTE "The plaintest has length:",0       KeyIs BYTE "The passphrase: ",0       PlainTextIs BYTE "The plaintext: ",0       CipherTextIs BYTE "The ciphertext: ",0       KMAX = 64                        ; passphrase buffer maximum size       BMAX = 128                       ; test...

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