Question
Assembly Language 2. Each of these problems gives before conditions and an instruction. Give the indicated after state. Before Instruction executed After (a) ECX: 00
Assembly Language
2. Each of these problems gives "before" conditions and an instruction. Give the indicated "after" state.
| Before | Instruction executed | After | ||||
(a) | ECX: 00 00 BF 7A | mov ecx, -89 | ECX |
|
|
|
|
|
|
|
|
|
|
|
|
(b) | ECX: 00 00 BF 7A | mov ecx, 984 | ECX |
|
|
|
|
|
|
|
|
|
|
|
|
(c) | EAX: 12 34 56 78 EDX: 9A BC DE F0 | xchg ax, dx | EAX |
|
|
|
|
|
|
|
|
|
|
| |
|
| EDX |
|
|
|
| |
|
|
|
|
|
|
|
|
(d) | EAX: FF FF FF C8 | add eax, 56 | EAX |
|
|
|
|
|
|
|
| SF __ | ZF__ | CF__ | OF__ |
|
|
|
|
|
|
|
|
(e) | EDX: 00 00 02 E9 | inc edx | EDX |
|
|
|
|
|
|
|
| SF __ | ZF__ |
|
|
|
|
|
|
|
|
|
|
(f) | EBX: FF FF FF 3B | neg ebx | EBX |
|
|
|
|
|
|
|
| SF __ | ZF__ |
|
|
|
|
|
|
|
|
|
|
(g) | EAX: 01 23 45 67 ECX: 89 AB CD EF | sub eax, ecx | EAX |
|
|
|
|
|
|
| SF __ | ZF__ | CF__ | OF__ | |
|
|
|
|
|
|
|
|
(h) | AX: 12 34 CX: 7A BC CF: 1 | adc ax, cx | AX |
|
|
|
|
|
|
|
|
|
|
| |
|
|
| CX |
|
|
|
|
|
|
| SF __ | ZF__ | CF__ | OF__ |
(i) | EAX: 00 00 00 0A EBX: FF FF FF FC EDX: FF 03 FF 01 | imul ebx | EAX |
|
|
|
|
|
|
|
|
|
|
| |
|
| EDX |
|
|
|
| |
|
|
|
| CF,OF __ |
|
| |
(j) | EAX: 00 00 00 10 ECX: FF FF FF FD EDX: FF 03 FF 01 | mul ecx | EAX |
|
|
|
|
|
|
|
|
|
|
| |
|
| EDX |
|
|
|
| |
|
|
|
| CF,OF __ |
|
| |
(k) | EAX: 00 00 00 0A EBX: 00 00 00 0C EDX: FF 03 FF 01 | imul eax,ebx | EAX |
|
|
|
|
|
|
|
|
|
|
| |
|
| EDX |
|
|
|
| |
|
|
|
| CF,OF __ |
|
| |
|
|
|
|
|
|
|
|
(l) | EAX: 00 00 0E AA ECX: 00 00 00 1B EDX: 00 00 00 00 | div ecx | EAX |
|
|
|
|
|
|
|
|
|
|
| |
|
| EDX |
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(m) | EAX: 00 00 0F CA EBX: 00 00 00 0D EDX: 00 00 00 00 | idiv ebx | EAX |
|
|
|
|
|
|
|
|
|
|
| |
|
| EDX |
|
|
|
|
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started