Basic Instructions

profilejav284
basic_instructions.docx

Answer the following questions:

a. For each part of this problem, assume the “before” values when the given instruction is executed. Give the requested “after” values.

Before

Instruction

After

1. EBX: 00 00 01 A2

mov eax, 100

EAX

b. For each part of this problem, assume the “before” values when the given instruction is executed. Give the requested “after” values.

Before

Instruction

After

DX: 01 4B

add dx, 40h

DX, SF, ZF, CF, OF

c. For each part of this problem, assume the “before” values when the given instruction is executed. Give the requested “after” values.

Before

Instruction

After

EBX: FF FF FF 75

ECX: 00 00 01 A2

sub ebx, ecx

EBX, ECX, SF, ZF, CF, OF

d. For each part of this problem, assume the “before” values when the given instruction is executed. Give the requested “after” values.

Before

Instruction

After

EAX: FF FF FF E4

EBX: 00 00 00 02

mul ebx

EAX, EDX, CF, OF

e. For each part of this problem, assume the “before” values when the given instruction is executed. Give the requested “after” values.

Before

Instruction

After

AX: FF 75

byte at count: FC

div count

AX