You are on page 1of 4

UNIT I

1. What is language processing? Explain application, PL and execution domain.


2. Define system software. Explain various system software components.
3. Define the term language processor and explain various language processing activities.
4. Define language processor and its types.
5. Explain pass structure of language processor.
6. Explain phase structure of language processor.
7. Explain feasibility issues related with phase structure of language processor.
8. Define the following terms with example.
a. Intermediate Representation
b. System program and application program
c. Language processing pass
d. Forward reference
e. Compiler Vs Interpreter
f. Language processor phase Vs pass
g. Language Translator
h. Language DeTranslator
9. Explain types of assembly language statements in detail.
10. Compare 2-pass and single pass assembler
11. List and explain types of assembly language statements with examples.
12. Explain with example, the difference between literal and constant. How are they treated by
assembler?
13. Discuss with suitable example Variant I and Variant II of intermediate code generation used
by the assembler. Also discuss time and space complexity issues.
14. Define assembler. Explain two pass assembler design in detail.
15. Explain the various data structures generated by pass I and pass II of two pass assembler.
16. What feature of assembly makes it mandatory to design a two pass assembler? Explain with
example.
17. Write an algorithm for Pass I of Two Pass Assembler.
18. Write an algorithm for Pass II of Two Pass Assembler.
19. Enlist the different types of errors that are handled by Pass I and Pass II of two pass
assembler.
20. Explain with example different types of errors handled in assembler.
21. For the given piece of assembly language code, show the contents of symbol table, literal
table and pooltable along with intermediate code and machine code. Assume size of
instruction equal to one.
22. Explain the term back-patching.
23. Can single pass assembler resolve forward reference? Justify your answer with appropriate
example
24. and data structures needed.
25. Define forward reference. Can we handle forward references in single pass assembler? If yes
explain how they can be handled, if not, why?
26. Explain with example the need of pool table in assembler.
27. With a neat diagram explain how any input string is processed by LEX n YACC
28. Explain with example need of TII in single pass assembler.
29. What are the assembler directives? Explain how assembler directives LTORG, ORIGIN,
START, END and EQU are processed with examples
30. Explain in detail data structures used in Pass I and Pass II of assembler.
31. Define the following :
a. Assembler
b. Macroprocessor
c. Compiler
d. Interpreter
e. Loader/Linker
32. Say true or false and justify your answer:
a. Single pass assembler can handle forward references.
b. Error, “symbol used but not defined” can be detected during pass I of two pass
assembler.
c. Assembler directives get translated into object code.
d. The literals used in assembly language get memory allocated only after END.
33. 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

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

You might also like