(e) What is an object file, and what does it contain?

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Topic Video
Question

(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 call conventions, and then stores the return value from “P” into A. (You do not need to show any
code for the procedure “P”.)

(e) What is an object file, and what does it contain?

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education