Professional Documents
Culture Documents
Q.2 (a) Explain the various stages of the life cycle of a source program with a [06] CO1 U
neat diagram.
(b) Explain language processing activities. [05] CO2 U
(c) List various phase of a language processor. Explain roles of phases of [04] CO2 U
language processor. Also explain symbol table.
OR
Q.2 (a) What is Symbol table? Explain how one can organize Symbol table [06] CO2 U
using Linear Data Structure?
(b) Explain lexical analysis of a language processor. [05] CO2 U
(c) State the differences between system software and application software. [04] CO1 R
START 200
V DS 4
L1 MOVER
AREG,Y
SUB
AREG,Z
MOVEM
AREG,W
W EQU X+2
L2 PRINT
W
ORIGIN
X-5
Z DC '9'
ORIGIN L2+1
STOP
Y DC ‘7’
END
Explain use of various data structures (tables) needed in PASS I of the
(b) [5] CO2 U
assembler. Also give details of their fields. Explain various suitable data
structures for the symbol table
(c) Write a brief note on different assembly language statements. [4] CO2 U
OR
Consider following assembly language program:
Q.3 (a) Show (i) Contents of Symbol Table [6] CO2 A
(ii) Intermediate codes using Variant-2 representation.
START 101
READ N
MOVER BREG,ONE
MOVEM BREG,TERM
AGAIN MULT BREG,TERM
MOVER CREG,TERM
ADD CREG,ONE
MOVEM CREG,TERM
COMP CREG,N
BC LE,AGAIN
MOVEM BREG,AGAIN
PRINT RESULT
STOP
N DS 1
RESULT DS 1
ONE DC '1'
TERM DS 1
END