1. What is the use of base register table in AIX assembler?
A base register table is used to remember which of the general purpose registers are currently available as base registers and also the base addresses they contain. USING statement causes entry to the table and .DROP statement removes the corresponding table entry.
2. Differentiate the assembler directives RESW and RESB.
RESW –It reserves the indicated number of words for data area. Eg: 10 1003 THREE RESW 1 In this instruction one word area (3 bytes) is reserved for the symbol THREE. If the memory is byte addressable then the address assigned for the next symbol is 1006.
RESB –It reserves the indicated number of bytes for data area. Eg: 10 1008 INPUT RESB 1 In this instruction one byte area is reserved for the symbol INPUT .Hence the address assigned for the next symbol is 1009.
3. Define modification record and give its format.
This record contains the information about the modification in the object code during program relocation. The general format is Col 1 M Col 2-7 Starting location of the address field to be modified relative to the beginning of the program Col 8-9 length of the address field to be modified in half bytes.
4. Write down the pass numbers (PASS 1/ PASS 2) of the following activities that occur in a two pass assembler:
a. Object code generation
b. Literals added to literal table
c. Listing printed
d. Address location of local symbols
Answer: a. Object code generation - PASS 2 b. Literals added to literal table – PASS 1 c. Listing printed – PASS2 d. Address location of local symbols – PASS1
5. What is meant by machine independent assembler features?
The assembler features that do not depend upon the machine architecture are known as machine independent assembler features. Eg: program blocks, Literals.
6. How the register to register instructions are translated in assembler?
In the case of register to register instructions the operand field contains the register name. During the translation first the object code is converted into its corresponding machine language equivalent with the help of OPTAB. Then the SYMTAB is searched for the numeric equivalent of register and that value is inserted into the operand field. Eg: 125 1036 RDREC CLEAR X B410 B4-macine equivalent of the opcode CLEAR 10-numeric equivalent of the register X.