
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
a) Convert 89806910h from machine language to its corresponding assembly language.
Show all of your workings.
(b) Suppose the instruction MOV DI, [BP+42h], appears in a
language for the given instruction?

Transcribed Image Text:8.
R/M
000
001
010
011
100
101
110
111
Use the following charts to answer the questions (a) and (b)
MOD = 11
W=0
AL
CL
DL
BL
AH
CH
DH
BH
W=1
AX
CX
DX
BYTE 1
1000 10
OP CODE
BX
SP
BP
SI
DI
R/M
000
001
010
(BX) + (SI)
(BX) + (DI)
(BP) + (SI)
(BP) + (DI)
(SI)
101 (DI)
110 DIRECT ADDRESS
111 (BX)
EFFECTIVE ADDRESS CALCULATION
MOD=00
011
100
MOD=01
DW MOD REG R/M
(BX) + (SI) + D8
(BX) + (DI) + D8
(BP) + (SI) + D8
(BP)+(DI) + D8
(SI) + D8
(DI) + D8
(BP) + D8
(BX) + D8
Figure: R/M vs MOD Chart for MOV: 100010 instruction
11
OR
REGISTER SELECT (SEE FIGURE 3-7)
BYTE 3
LOW DISPLACEMENT HIGH DISPLACEMENT
DIRECT ADDRESS !
LOW BYTE
MOD=10
(BX) + (SI) + D16
(BX) + (DI) + D16
(BP) + (SI) + D16
(BP) + (DI) + D16
(SI) + D16
(DI) + D16
(BP) + D16
(BX) + D16
Figure: MOV: 100010 instruction template
BYTE 4
DIREST ADDRESS
HIGH BYTE
(5 BITS) ADDRESSING MODE (SEE FIGURE 3.8)
-BYTEWORD DATA 0 BYTE 1 = WORD
- DIRECTION TO/FROM REG 0= FROM 1 - TO
-OPERATION CODE
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 3 steps

Knowledge Booster
Similar questions
- 2. Write the assembly code for the following high-level pseudo code: if ((a>=b) AND (b==c)) OR (a<=c) then a =b+c else a = b -carrow_forwardShow the assembly instruction for the following machine code, given in hexadecimal. Explain all fields in detail. 03A2F023arrow_forwardThe portion of the generated assembly code implementing the C function int (int x, int y, int z) is as follows: Based on this assembly code, fill in the missing portions of the C code. Verify your answer using gcc compiler. Note: x in %edi, y in %esi, z in %edx.arrow_forward
- In generall, computers think in terms of numbers (i.e. binary data). Thus, any operation performed in the computer must be done using either mathematical or logical operations. Given this inherit limitation of computers, what is the compare instruction actually doing when we, as assembly programmers, provide two numbers for it to "compare"? Furthermore, what assembly instruction is similar to the compare instruction? How are the two instructions different?arrow_forwardWrite an assembly code to assign the register BX with 4014H, and register DX with 4028 H. Move the content of BX to DX, und verse versa. Then, copy the now value of low content for BX and DX .to memory location [2131 H], and [2139H]arrow_forwardProvide the format and assembly language instruction for the following hex values Address 1001: 03arrow_forward
- Suppose that we are developing a new version of the AMD Barcelona proces- sor with a 4 GHz clock rate. We have added some additional instructions to the instruction set in such a way that the number of instructions has been reduced by 15% from the values shown for each benchmark in Exercise 1.12. The execution times obtained are shown in the following table. a. Name Execution Time (seconds) Reference Time (seconds) bzip2 700 9650 SPECratio 13.7 1.13.2 [10] In general, these CPI values are larger than those obtained in previous exercises for the same benchmarks. This is due mainly to the clock rate used in both cases, 3 GHz and 4 GHz. Determine whether the increase in the CPI is similar to that of the clock rate. If they are dissimilar, why?arrow_forwardConsider a system in which Data and Code are distinct. When necessary, the CPU acquires instructions or data using two base-limit register pairs. Data and instructions should be kept separate. By default, this pair is read-only, allowing several users to share the programme. This method should be compared to others.arrow_forwardE In the following code block(Reference:Q11), you will a set of assembly instructions with corresponding line numbers (line numbers are for informational purpose only and they are not part of the source code). 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 mov edx, 5 dec ecx jmp LABEL1 mov eax, 1 LABEL1: mul edx jmp ecx mov edx, 0678h sub edx, eax jmp DWORD PTR [edx] neg ebx add ecx, ebx mov eax, 0 For each of the conditions/scenario listed below, indicate the corresponding line number (that cause or is associated with the condition/scenario). Enter 0 (Zero) if the condition is not caused by the block of code. 1) Memory indirect jump: type your answer... type your answer... type your answer... type your answer... 2) Register indirect jump: 3) Relative short jump: type your answer... 5) Two's complement type your answer... 4) Relative near jump: 6) Unreachable codearrow_forward
- Consider the instruction fields below: Op= 0, rs= 17, rt= 3, rd= 4, shamt= 0, funct= 39 Provide the assembly language instruction in correct format.The grader is formatted, so please note the small letters, spaces, commas, dollar signs, etc. like the examples below. instructions and register names use small letters, hex digits (A,B,C,D,E,F) are capital, ALL 16-bit immediate values should be represented in hex, with a Ox prefix and 4 hex digits like the examples below addi $t0, $s1, OX00A2 Iw $s2, 0X40E2($a2)arrow_forwardAs part of the von Neumann architecture, the a) processing unit and b) programmer counter serve which of the following?arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON

Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education

Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY