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

Complete the code snippet below by writing the appropriate x86 instruction into

ID: 2315662 • Letter: C

Question

Complete the code snippet below by writing the appropriate x86 instruction into each of the blank spaces. The purpose of each instruction is described in a comment to the right of the blank.; Copy a word from; address 4370h into; the upper 16 bits of; EAX, using two; instructions. The; lower 16 bits of EAX; should be set to 0; Divide the value in BX; by 128 and place the; result in BX, using a; single instruction; Copy the sign bit of; the value in ECX; into the carry flag,; then ensure ECX holds; a negative value; Move the value in the; carry flag into the; most significant bit; of DX (you may change; other bits of DX); Find the position of; the most significant; nonzero bit in BL,; and store that; position in CL; Clear the middle 16; bits of EAX without; changing any other; bits in 1 instruction

Explanation / Answer

i) MOVZX EAX, WORD PTR [4370]

ROR EAX, 16

ii) SHR BX, 7

iii) BACK: SHL ECX,1

JNC BACK

iv) RCR DX

v) BSR BL,CL

vi) AND EAX, FF0000FFH

The image of rest subparts is not clear.