35 35 votes A simple two-pass assembler does the following in the first pass: It allocates space for the literals. It computes the total length of the program. It builds the symbol table for the symbols and their values. It generates code for all the load and store register instructions. None of the above. Compiler Design gate1993 compiler-design assembler easy multiple-selects + – Kathleen 23.6k views answer comment Share Follow Print See all 4 Comments 4 4 Comments reply the_bob commented Oct 11, 2020 reply Follow flag Hi, is the ‘Assemblers’ portion there in the Compiler Design part of GATE syllabus? 0 0 replyShare Mitali gupta commented Nov 2, 2020 reply Follow flag Tasks performed in 1st pass – - Assign address to all statements (address resolution) - Save the values - Processing of assembler directives - Table creation , Adding literals to literal table - Allocate space for literals - Compute total length of a program Tasks performed in 2nd pass – - Generate object oriented code - Writing/prinitng assembly listing - Generate code for all load and store instruction 19 19 replyShare Danishgupta commented Nov 23, 2022 reply Follow flag Hey mitali in pass 1 processing of all assembling directives is not possible 0 0 replyShare Raj_Dev_Verma commented 2 days ago reply Follow flag A,C,B are true in first pass symbal table is created. 0 0 replyShare Please log in or register to add a comment.
Best answer 40 40 votes A, B, C are TRUE. https://gateoverflow.in/?qa=blob&qa_blobid=2337905098612945492 Arjun answered Nov 7, 2015 • edited Nov 25, 2017 by kenzou Arjun comment Share Follow See all 6 Comments 6 6 Comments reply Show 3 previous comments tusharp commented Nov 21, 2018 reply Follow flag It allocates space for the literals. As per the given pdf in pass 1 each line of the AL is given some address and literals are stored in symbol table. In pass 2 OPTAB and SYMTAB works in collaboration to generate mc code. B and C options are fine. I am not getting why A? 0 0 replyShare tusharp commented Jan 22, 2019 reply Follow flag @jatin khachane 1 plz help with option a. 0 0 replyShare surya_siddina commented Dec 11, 2024 reply Follow flag @Arjun @Deepak Poonia @Sachin Mittal 1 sir , is Assembler concept present in GATE COMPILER DESIGN now. 1 1 replyShare Please log in or register to add a comment.
27 27 votes A,B,C are correct scan the code twice. The first time, just count how long the machine code instructions will be, just to find out the addresses of all the labels. Also, create a table that has a list of all the addresses and where they will be in the program. This table is known as the symbol table. On the second scan, generate the machine code, and use the symbol table to determine how far away jump labels are, and to generate the most efficient instruction. Reference-http://users.cis.fiu.edu/~downeyt/cop3402/two-pass.htm vnc answered Sep 27, 2016 vnc comment Share Follow See all 2 Comments 2 2 Comments reply psrock541 commented Sep 22, 2020 reply Follow flag Completely understandable from this link,, thank u :) 1 1 replyShare Paatni22 commented Oct 20, 2020 reply Follow flag Best answer. Follow the link given. nicely explained 0 0 replyShare Please log in or register to add a comment.
0 0 votes A,B,C are the Correct answers Nagarjuna Vemula answered Sep 12, 2025 Nagarjuna Vemula comment Share Follow 0 reply Please log in or register to add a comment.