
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

Transcribed Image Text:Q.8.
are missing. The assembler generates a relocatable code. All references use direct addressing. Write the values of the location
counter (LC) and the contents of the symbol table, and also fill in the missing references in the machine code. (Assume that 3
bytes are allocated for each instruction and WORD pseudo-operation allocates 3 bytes and stores the given number at that byte.)
Given the following assembly language program and its equivalent machine language code where some references
START
LC
Machine code
INST1
ЗА
00
00
Symbol Table
L1:
INST2 D1
D5
??
??
JZR
L1
7B
??
??
HLT
4C
00
00
D1:
WORD
5
00
00
05
END
Expert Solution

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

Knowledge Booster
Similar questions
- Assume that the instruction pointer, EIP, contains 9810 and the assembly language representation of the instruction in memory at address 9810 is JAE 131. If the flags are currently CF=1, ZF=0 and SF=0 what is the value of the EIP after the instruction executes?arrow_forwardSuppose a byte-addressable computer using set-associative cache has 216 bytes of main memory and a cache of 32 blocks, and each cache block contains 8 bytes.Q.) If this cache is 2-way set associative, what is the format of a memory address as seen by the cache; that is, what are the sizes of the tag, set, and offset fields?arrow_forwardTranslate the following C code to MIPS assembly, assuming that the variables f, g, h, i, and j correspond to registers $50, $s1, $s2, $s3, and $54 respectively. Also, assume that the base addresses of arrays A and B are contained in $56 and $s7 respectively, and that each element of arrays A and B are 4-byte words: B[8] =A[i] + A[j]; Which of the following MIPS assembly code snippets correctly performs the above operation? sll $t1, $s3, 2; add $t1, $56, $t1; lw $12, 0($t1); sll $t1, $s4, 2; add $11, $s6, St1; lw $13, 0($t1); add $12, $12, $t3; sw $12, 32($s7) sll $t1, $s3, 2; add $11, $s6, $t1; lw $12, 0($t1); sll $t1, $s4, 2; add $11, $s6, $t1; lw $13, 0($t1); add $t4, $12, $t3; sll $15, $t0, 2; add $15, $s7, $15; sw $t4, 32($15) Iw $11,0($s3); Iw $12, 0($s4); add $13, $11, $12; sw $13, 32($s7) sll $t1, $s3, 2; lw $12, 0($t1); sll $t1, $s4, 2; lw $13, 0($t1); add $t4, $t2, $t3; sw $t4, 32($s7)arrow_forward
- Consider memory storage of a 64-bit word stored at memory word 32 ina byte-addressable memory(a) What is the byte address of memory word 32?(b) What are the byte addresses that memory word 32 spans?(c) Draw the number 0xF1234567890ABCDE stored at word 32 in both big-endianand little-endian machines. Clearly label the byte address corresponding to eachdata byte value.arrow_forwardQ2. For the following assume that values A, B, C, D, E, and F reside in memory. Also assume that instruction operation codes are represented in 6 bits, memory addresses are 64 bits, data size is 32 bits and register addresses are 5 bits. a. For each instruction set architecture shown in Figure A.1, how many addresses or names (including both memory and register), appear in each instruction for the code to compute C = A+ B, and what is the total code size? passor TOS Memory (A) Accumulator (C) Registry (D) Re loed oore Figure A.1 Operand locations for four instruction set architecture classes. The arrows indicate whether the oper and is an input or the result of the orithmetic-logical unit ALU operation, or both an input and result Lighter shoes indicate inputs, and the dark shode indicates the result in a top of stack (TOS) register points to the top input operand, which is combined with the operand below. The first operand is removed from the stack, the result takes the place of the…arrow_forwardPlease solve and show all work. For the following C statement, what is the corresponding MIPS assembly code? Assume that the variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively. Assume that the base address of the arrays A and B are in registers $s6 and $s7, respectively. Assume that the elements of the arrays A and B are 8-byte words: f = (g+i+2) + (h − 8); B[8] = A[i-9] + A[j+8] + 7;arrow_forward
- (a) In MIPS machine language, the R format instructions need an additional field (the “funct” field) to specify the instruction type (“add”, “sub”, etc.). Why can’t this be done using just the 6-bit “op” field, which all MIPS instructions have, instead? (b) Give a sequence of MIPS assembly language instructions that adds the contents of $s0 and $s1, storing the result into $s0, if the contents of $s1 are greater than 6. Otherwise, the contents of $s0 should be incremented by 28. In either case, afterwards the contents of $s0 should be copied into $s2. (c) Suppose that the starting address of an array of words is stored in $s0. Give a MIPS assembly language instruction that loads the contents of the second word in the array into $s1. (d) Suppose that A and B are defined using “A: .word 0”, and “B: .space 100”. Give a sequence of MIPS assembly language instructions that calls a procedure “P” with its two arguments being the contents of A and the address of B, using the standard procedure…arrow_forwardThe stack segment, data segment, and code segment are all separate entities. Next, ascertain which combination of registers is used to address data items inside each segment.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
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