This document contains an assignment on system software involving a two-pass assembler. It asks the student to:
1) Explain how an assembler handles various statements like constants, ORIGIN, LTORG, and symbol references/definitions.
2) Discuss how an EQU statement can be processed if the operand is a forward or backward reference.
3) Determine if an ORIGIN statement operand can contain a forward reference and how it would be processed.
4) Design an error table for the first pass and comment on how error messages could be organized.
5) Develop a complete program specification for the two passes including input/output tables and files and recommend an appropriate organization
Download as DOC, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
2K views
Assignment For System Software
This document contains an assignment on system software involving a two-pass assembler. It asks the student to:
1) Explain how an assembler handles various statements like constants, ORIGIN, LTORG, and symbol references/definitions.
2) Discuss how an EQU statement can be processed if the operand is a forward or backward reference.
3) Determine if an ORIGIN statement operand can contain a forward reference and how it would be processed.
4) Design an error table for the first pass and comment on how error messages could be organized.
5) Develop a complete program specification for the two passes including input/output tables and files and recommend an appropriate organization
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2
Assignment for system software
1. How does an assembler handle the following statements?
Explain with an example for each (a) Constants (b) ORIGIN (c) LTORG (d) Explain Symbol reference/definition.
2. An assembly program contains the statement
X EQU Y+25 Indicate how the EQU statement can be processed if (a)Y is a back reference (b)Y is a forward reference
3. Can the operand expression in an ORIGIN statement contain
forward reference? If so, outline how the statement can be processed in a two pass assembly scheme.
4. A two pass assembler performs program listing and error
reporting in pass 2 using the following strategy: Errors detected in pass 1 are stored in an error table. These are reported with pass 2 errors while producing the program listing. (a)Design the error table for use by pass 1 What is its entry format? What is the table organization? (b)Let the error messages (ex. Duplicate label…) be stored in an error table. Comment on the organization of this table. Comment on the organization of this table.
5.1. Develop complete program specification for the passes of
a two pass assembler indicating (a) Tables for internal use of the passes (b) Tables to be shared between passes (c) Input (files and tables) for every pass (d) Outputs (files and tables) for every pass
5.2. Recommend appropriate organization for the tables and
files used in the two pass assembler of above problem Specify clearly why certain information is in the form of tables in memory while other information is in the form of file.