Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

REG Problem 3 (25 points) For the following program code, calculate the machine code using the given information and store in memory MOV CX, 9

image text in transcribed
REG Problem 3 (25 points) For the following program code, calculate the machine code using the given information and store in memory MOV CX, 9 Code Table: W-1| W-0 Here: MOV (DI), BL Immediate to register: 1011 w reg data INC DI AXI AL Reg/mem to mem/reg: opcode d w mod reg r/m CX CL DEC CX Increment register: 01000 reg DX DL JNZ Here Decrement register: 01001 reg BX BL Jump on non-zero: 01110101 (IP-inc8) SP AH Note: The memory contents start at 504; BP CH opcode for MOV is 100010. SI DH DI 0001 001 0101 011 100 101 110 110 Mod Mod = 11 Effective address calculation R/MW-0 W=1 R/M Mod 00 Mod -01 Mod-10 000 AL AX 000 (BX)+(SI) (BX)+(S1)+D8 (BX)+(S1)+D16 001 CL CX 001 (BX)+(DI) (BX)+(DI)+D8 (BX)+(DT)+D16 010 DL PX 010 (BP)+(SI) (BP)+(ST)+D8 (BP)+(SI)+D16 BL BX 011 (BP)+(DI) (BP)+(DI)+D8 (BP)+(DI)+D16 AH SP100 (SI) |(ST)+D8 (SI)+D16 CH BP 101 (DI) (DI)+D8 (DI)+D16 DH SI 110 Direct (BP)+D8 |(BP)+D16 111 BH DI ii KBX) (BX)+D8 (BX)+D16 00 Mode Memory Memory with 8-bit disp. Memory with 16-bit disp. Register 101 10 11 REG Problem 3 (25 points) For the following program code, calculate the machine code using the given information and store in memory MOV CX, 9 Code Table: W-1| W-0 Here: MOV (DI), BL Immediate to register: 1011 w reg data INC DI AXI AL Reg/mem to mem/reg: opcode d w mod reg r/m CX CL DEC CX Increment register: 01000 reg DX DL JNZ Here Decrement register: 01001 reg BX BL Jump on non-zero: 01110101 (IP-inc8) SP AH Note: The memory contents start at 504; BP CH opcode for MOV is 100010. SI DH DI 0001 001 0101 011 100 101 110 110 Mod Mod = 11 Effective address calculation R/MW-0 W=1 R/M Mod 00 Mod -01 Mod-10 000 AL AX 000 (BX)+(SI) (BX)+(S1)+D8 (BX)+(S1)+D16 001 CL CX 001 (BX)+(DI) (BX)+(DI)+D8 (BX)+(DT)+D16 010 DL PX 010 (BP)+(SI) (BP)+(ST)+D8 (BP)+(SI)+D16 BL BX 011 (BP)+(DI) (BP)+(DI)+D8 (BP)+(DI)+D16 AH SP100 (SI) |(ST)+D8 (SI)+D16 CH BP 101 (DI) (DI)+D8 (DI)+D16 DH SI 110 Direct (BP)+D8 |(BP)+D16 111 BH DI ii KBX) (BX)+D8 (BX)+D16 00 Mode Memory Memory with 8-bit disp. Memory with 16-bit disp. Register 101 10 11

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting For Managers Text And Cases

Authors: William J. Bruns

3rd Edition

0324291213, 978-0324291216

More Books

Students also viewed these Accounting questions

Question

What are the roles and responsibilities of an external auditor?

Answered: 1 week ago

Question

(c) Disk memory is volatile. True or false?

Answered: 1 week ago

Question

How do media shape our thinking?

Answered: 1 week ago

Question

Describe Elizabeths credibilityinitial, derived, and terminal.

Answered: 1 week ago