Gujarat Technological University
Gujarat Technological University
___________
Q.4 (a) (i) Write difference between one pass and two pass assembler. 03
(ii) Explain Symbol table and Mnemonics table with suitable example. 04
(b) Given an assembly language program for finding factorial of a given 07
number N with Mnemonic code details. Write an equivalent machine
language program.
START 101 Mnemonics CODE
READ N STOP 00
MOVER BREG, ONE ADD 01
MOVEM BREG, TERM MULT 03
AGAIN MULT BREG, TERM MOVER 04
MOVER CREG, TERM MOVEM 05
ADD CREG, ONE COMP 06
MOVEM CREG, TERM BC 07
COMP CREG, N READ 09
BC LE, AGAIN PRINT 10
MOVEM BREG, RESULT LE 02
PRINT RESULT START 01
STOP END 02
N DS 1
RESULT DS 1 Ordinal number of BREG
ONE DC ‘1’ and CREG is 2 & 3
TERM DS 1 respectively
END
OR
Q.4 (a) What are advanced assembler directives. Explain any two with suitable 07
example.
Q.4 (b) Explain macro expansion in details. 07
*************