1. The single pass assembler works by reading the source program once. It performs assembly of instructions and allocation of memory locations. It reads each instruction, generates object code and moves to the next instruction.
2. The algorithm for Pass-II of a two-pass assembler involves reading the symbol table generated in Pass-I and resolving all symbolic addresses to absolute addresses.
3. For the given assembly language program, the MNT contains START, HELLO, YALE symbols. MDT contains MIT, MOVER, ADD macros. The stack contains parameters &A, &Z, &W. The expanded code is shown for each instruction with resolved addresses.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
44 views1 page
SP Unit Test 1 - Set A
1. The single pass assembler works by reading the source program once. It performs assembly of instructions and allocation of memory locations. It reads each instruction, generates object code and moves to the next instruction.
2. The algorithm for Pass-II of a two-pass assembler involves reading the symbol table generated in Pass-I and resolving all symbolic addresses to absolute addresses.
3. For the given assembly language program, the MNT contains START, HELLO, YALE symbols. MDT contains MIT, MOVER, ADD macros. The stack contains parameters &A, &Z, &W. The expanded code is shown for each instruction with resolved addresses.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1
Pune Institute of Computer Technology, Pune-43
DEPARTMENT OF INFORMATION TECHNOLOGY
(Academic Year – 2019-20 Sem-II) UNIT TEST - I Subject: Systems Programming Subject Code: 314451 Class: TE ( IT ) Div: XI [ Max. Marks : 30] Date: 07/02/2020 Day: Friday Duration: 1 Hour
Instructions to the candidate: SET-A
1. All questions are compulsory. Roll No: - 2. Assume suitable data, if necessary.
Ques. CO Bloom’s Max
Question No. Mapped LL Marks Explain how a single pass assembler works for the following example: START 300 READ A LOOP MOVER AREG, A 1-a SUB AREG, =’1’ CO-1 L3 06 BC GT, LOOP STOP A DS 1 END Write an algorithm for Pass-II of two-pass assembler and explain with 1-b CO-1 L2 04 suitable example. For the following assembly language program show MNT, MDT, stack organization and the expanded code for the given assembly language program. MACRO START XYZ &A MIT HELLO MOVER AREG,&A ADD AREG, BREG MEND HELLO YALE 2-a MACRO CO-2 L3, L5 10 MIT &Z YALE EQUS MACRO ALL DC 3 &Z &W END ADD BREG, &W XYZ ALL MEND MOVER &Z, ALL MEND For the given 'C' code, generate the output of lexical analysis. //My first C Program void main ( ) { int i, j; clrscr( ); 3-a scanf("%d %d",&i,&j); CO-3 L4, L5 06 while (i <= j) { i++; j--; } printf("C Programming!"); getch( ); } 3-b Define the term Lexeme, Token and Pattern with Example. CO-3 L1, L2 04 -----------******----------- Page 4 of 4