1,318 views
State whether the following statements are True or False with reasons for your answer:

A two pass assembler uses its machine opcode table in the first pass of assembly.

@srestha i think 2nd statement is false

http://users.cis.fiu.edu/~downeyt/cop3402/two-pass.htm

no @Sonam check these lines

scan the code twice. The first time, just count how long the machine code instructions will be, just to find out the addresses of all the labels. Also, create a table that has a list of all the addresses and where they will be in the program. This table is known as the symbol table.

This para also suggests that B is false right?
edited by

In question MOT(machine opcode table)  is asked and Not symbol table ….It is used in both the passes hence true.

for pass 1 – it is used to get length of mnemonics and modify location counter.

for pass 2- it is used to obtain respective  machine code .

Note-symbol table  and Literal table is created in first pass and it is used in second pass

b is false i think

In the first pass of the assembler, $\textsf{Machine Opcode Table}\; (\textsf{MOT})$ is used to get the opcode size of the mnemonics which is needed to increment the $\textsf{LOCCTR}$ which is needed to determine the address of the labels. The labels and their corresponding addresses go to the $\textsf{Symbol Table}$ which is thus populated during the first phase and used in the second phase whereas $\textsf{MOT}$ is not modified but just used in the two phases – in the second phase to convert menmonic to opcode.
by

1
749 views