hw4 solutions - Su Andy Homework 4 Due Oct 2 2007 11:00 pm...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Su, Andy – Homework 4 – Due: Oct 2 2007, 11:00 pm – Inst: Valvano 1 This print-out should have 17 questions. Multiple-choice questions may continue on the next column or page – fnd all choices beFore answering. The due time is Central time. Homework 4 001 (part 1 oF 1) 10 points Assuming the assembler has two passes, which answer best describes the activities that occur in pass 1 ? 1. The size oF each instruction in the source code is determined. This data is used to build a symbol table. correct 2. None oF these choices is correct. 3. The op code and operand oF each instruc- tion in the source code are determined. This data is used to determine the object code. 4. All the pseudo-ops are processed in the source code in order to determine where in memory the program will go. 5. Object code is loaded into memory. 6. The op code oF each instruction in the source code is determined. Explanation: The most important goal oF pass 1 is to create the symbol table. 002 (part 1 oF 1) 10 points Assuming the assembler has two passes, which answer best describes the activities that occur in pass 2 ? 1. All the pseudo-ops are processed in the source code in order to determine where in memory the program will go. 2. The size oF each instruction in the source code is determined. This data is used to build a symbol table. 3. The op code and operand oF each instruc- tion in the source code are determined. This data is used to determine the object code. correct 4. Object code is loaded into memory. 5. The op code oF each instruction in the source code is determined. 6. None oF these choices is correct. Explanation: The most important goal oF pass 2 is to generate object code. The listing fle is also created in pass 2. 003 (part 1 oF 1) 10 points The symbol table contains mappings between symbols and their corresponding numeric values. In what Format are these numeric values stored? 1. 8-bit unsigned. 2. none oF these choices is correct 3. 32-bit signed. 4. 16-bit signed. 5. 16-bit unsigned. correct 6. 32-bit unsigned. 7. ±oating point. 8. 8-bit signed. Explanation: On most 6811/6812 systems, addresses are 16-bit unsigned values. The values oF the symbols are usually the corresponding ad- dresses where that system is located. Thus, 6811/6812 assemblers usually store the values oF symbols as 16-bit unsigned numbers. 004 (part 1 oF 1) 10 points Which answer best describes the di²erence between the use oF these two pseudo ops? E equ 51 S set 51
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Su, Andy – Homework 4 – Due: Oct 2 2007, 11:00 pm – Inst: Valvano 2 1. None of these choices is correct. 2. They are totally identical.For many of the pseudo ops, TExaS supports multiple spellings of the same operation. 3. Both are labels with a value of 51, but S can be rede±ned to other values at other places in the software by other set pseudo ops. correct 4. E is a label with a value of 51, whereas S is allocated in memory with an initial value of 51.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 6

hw4 solutions - Su Andy Homework 4 Due Oct 2 2007 11:00 pm...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online