Professional Documents
Culture Documents
STAR 200
MOVER AREG, A
L: MOVEM BREG. = ’2’
ADD BREG, = ’2’
ADD CREG, = ’3’
ORIGIN L+20
LTORG
MOVER, AREG, C
C EQU L+15
ADD AREG, = ’2’
ADD BREG, = ’5’
A DS 5
END
34. For the following piece of assembly Language code. Show the Content of Symbol Table,
Literal Table, Pool Table and IC and Machine Code. Assume the machine opcode and size of
Instruction as 1
START 1500
READ LAB
LOOP MOVER AREG,A
MOVER BREG, = ‘l’
A EQU LOOP+5
LOAD B
ORIGIN A +l0
LTORG
B MOVER CREG, = ‘2’ STORE
D MOVEM AREG, = ‘l’
LAB DS l0
STOP
END
35. Explain how a single pass assembler works for the following example. Explain the terms
forward reference and backpatching with respect to the example given.
START 300
READ A
LOOP MOVER AREG,A
SUB AREG, ='l'
BC GT, LOOP
STOP
A DS 1
END
36. Generate symbol table, literal table, pool table, Intermediate code and Target Code for the given
assembler program. Assume a hypothetical instruction set with every instruction of length 1
START 1000
A DS 05
LOAD A
SUB AREG, =’10’
DIV BREG, =’ 10’
TRANS L
L2 READ TEMP
LTORG
L ADD AREG, = ’5’
SUB BREG, =’ 15’
ADD B
B EQU L+10
ORIGIN L2 + 20
TEMP DS 5
C DC 10
STOP
END