please answer all of section 2 a, b, and c regarding x86 ISA.
Posted: Fri May 20, 2022 6:47 pm
please answer all of section 2 a, b, and c regarding x86
ISA.
II. The x86 ISA (2 pts. ea.) a. The primary data xfer instruction is the MOV. Give examples using MOV i. to copy the contents register eax to ecx ANSWER: ii. to copy the contents of memory to edx ANSWER: iii. to load ebx with an immediate value (24h) ANSWER: iv. to copy from memory to memory ANSWER: v. to copy the contents of edx to memory ANSWER:
b. Arithmetic instructions (2 pts. ea.) i. Use an instruction to add eax to memory ANSWER: ii. Use an instruction to subtract eax from memory ANSWER: iii. Where is the answer put if you multiply eax and ebx? ANSWER: iv. Write a div instruction that divides a 32-bit unsigned number by a 16- bit unsigned number. ANSWER: c. Control Flow instructions: What flag(or flags) values will cause each of the following conditional jumps to jump (or also known as branch in other processors)? (2 pts. ea.) i. JBE ANSWER: ii. JA ANSWER: iii. JO ANSWER: iv. JNO ANSWER: V. JE ANSWER: vi. JNE ANSWER: vii. JC ANSWER: viii. JNC ANSWER: ix. JS ANSWER: X. JNS ANSWER:
ISA.
II. The x86 ISA (2 pts. ea.) a. The primary data xfer instruction is the MOV. Give examples using MOV i. to copy the contents register eax to ecx ANSWER: ii. to copy the contents of memory to edx ANSWER: iii. to load ebx with an immediate value (24h) ANSWER: iv. to copy from memory to memory ANSWER: v. to copy the contents of edx to memory ANSWER:
b. Arithmetic instructions (2 pts. ea.) i. Use an instruction to add eax to memory ANSWER: ii. Use an instruction to subtract eax from memory ANSWER: iii. Where is the answer put if you multiply eax and ebx? ANSWER: iv. Write a div instruction that divides a 32-bit unsigned number by a 16- bit unsigned number. ANSWER: c. Control Flow instructions: What flag(or flags) values will cause each of the following conditional jumps to jump (or also known as branch in other processors)? (2 pts. ea.) i. JBE ANSWER: ii. JA ANSWER: iii. JO ANSWER: iv. JNO ANSWER: V. JE ANSWER: vi. JNE ANSWER: vii. JC ANSWER: viii. JNC ANSWER: ix. JS ANSWER: X. JNS ANSWER: