Question: Q . 3 . ( 2 4 points ) Assembler In this question use Method 2 that performs one pass through the source code and

Q.3.(24 points) Assembler
In this question use Method 2 that performs one pass through the source code and one pass through the partial code.
Given the following assembly language program and the opcode table for this language where the opcodes, number of bytes and the addressing modes of the instructions are listed. BYTE is a pseudo-operation that allocates 1 byte and stores the given number at that byte. The assembler generates relocatable code.
a. Write down the partial code generated at the end of Pass 1 of the assembler.
b. Show the contents of Symbol Table (ST), Forward References Table (FRT) and Direct Address Table (DAT).
c. Write down the machine language code generated at the end of Pass 2 of the assembler.
\table[[,START],[INST2 #5,],[L1:,INST1],[,INST4 D],[,JNR L1],[,INST3 D],[L2:,HLT],[D:,BYTE 1],[,END]]
Op-code Table
\table[[Mnemonic,\table[[Number],[of bytes]],Opcode,\table[[Addressing],[Mode]]],[INST1,1,3A,Implied],[INST2,2,47,Immediate],[INST 3,3,05,Direct],[INST4,3,2D,Direct],[JNR,3,C 5,Direct],[JZR,3,D 8,Direct],[BNE,3,E 3,Relative],[HLT,1,76,Implied]]
LC?
Partial code
\table[[],[],[],[],[],[],[],[],[]]
Symbol Table (ST)
\table[[Symbol,Address],[,],[,],[,],[,]]
Direct Address Table (DAT)
LC?()
Machine lang. code
Forward References Table (FRT)
\table[[Location,Symbol],[,],[,],[,],[,]]
Q . 3 . ( 2 4 points ) Assembler In this question

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!