Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Select the best answer from all dropdowns Please pay attention to these question

ID: 3757184 • Letter: S

Question

Select the best answer from all dropdowns Please pay attention to these questions that are similar, sometimes differing by one instruction or even just ONE character. Trace (i.e., execute manually) the following program, then select the best answer fromm each dropdown .data myDlordi DHORD myword1 WORD? myblord2 WORD ? myDlord2 DHORD ? . code std mov eax, 12345678h mov esi,OFFSET mywordi mov [esi], eax mov edi, OFFSETn myDword2 movsd mov edx, [edi] After the execution of the above program, the following registers will have the following values eax 12345678h: esi-Select J l Select J edx I Select )

Explanation / Answer

Since you post more than one question, so as per rule I am answering first question. Please try to post one question in one post from next time.

Answer of Q1.

"mov eax, 12345678h" => eax register will assign the value of 12345678h

Suppose the data "myWord1" is at the location of 04004000. Then the next statement "mov esi, OFFSET myWord1" will assign the esi register with the address of 04004000. Which means esi will point the the data area of "myWord1.

The next statement "mov [esi], eax" means the "myWord1" will assign with the value of 12345678h. Since "eax" contain the value 12345678h and "[esi]" means the contain where the esi is pointing. So "esi" is pointing to "myWord1" and for that reason "myWord1" value will change with 12345678h.

Next statement "mov edi, OFFSET myDWord2". Assume "myDWord2" offset address is 08004000. So "edi" will assign with the value of 08004000. Basically "edi" will point to the address of "myDWord2".

The last statement "mov edx, [edi]", will assign edx with the value which "edi" is pointing. Since "edi" is pointing to "myDWord2", so "edx" will assign the value of "myDWord2".

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote