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

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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 find 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 file 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. floating 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 difference between the use of these two pseudo ops? E equ 51 S set 51 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....
View Full Document

Page1 / 6

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

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