Consider the following statements for a simple assembler : 1. It scans the entire assembly program twice, where each scan is called a pass. 2. It generates a table that includes all symbols and their binary values. 3. It will use the symbol table and other tables to generate the object program and output some information that will be needed by the linker. Which of the above statements are correct ? 

Consider the following statements for a simple assembler : 1. It scans the entire assembly program twice, where each scan is called a pass. 2. It generates a table that includes all symbols and their binary values. 3. It will use the symbol table and other tables to generate the object program and output some information that will be needed by the linker. Which of the above statements are correct ?  Correct Answer 1, 2 and 3

The correct answer is option 4.

  •  Assemblers are programs that generate machine code instructions from a source code program written in assembly language. The assembler will replace symbolic addresses by numeric addresses, replace symbolic operation codes by machine operation codes, reserve storage for instructions and data, and translate constants into machine representation.
  • The functions of the assembler can be performed by scanning the assembly program and mapping its instructions to their machine code equivalent.
  • Since symbols can be used in instructions before they are defined in later ones, a single scanning of the program might not be enough to perform the mapping. A simple assembler scans the entire assembly program twice, where each scan is called a pass.
  • During the first pass, it generates a table that includes all symbols and their binary values. This table is called the symbol table.
  • During the second pass, the assembler will use the symbol table and other tables to generate the object program, and output some information that will be needed by the linker. 
  • The assembler uses at least three tables to perform its functions: symbol table, opcode table, and pseudo instruction table. The symbol table, which is generated in pass one, has an entry for every symbol in the program. Associated with each symbol are its binary value and other information. 

 

Hence, statements 1,2 and 3 are correct.

Related Questions

The following are the conditions for selecting list of a suitable candidates to be called for interview after the written test for the recruitment is conducted/ organized for management-level persons of a multi-national company. For providing accounting services and sales the candidates must (a) be holding a graduation in basic science with 65% or above or B. E degree with 55% and above marks (b) have passed the written test with 70% or above marks (c) the age must be in the group 25 to 30 years as on 1/4/18 (d) have experience in an accounting firms for three years and diploma in accounting with 60% or above marks (e) be presently drawing CTC of 6 Lakhs per annum and above In case the applicant who satisfies all other terms above except 1) at (a) above, then be referred as Junior Accountant 2) at (d) & (e) above then be referred as Trainee-Accountant Satisfying all the above with experience of 5 years then be referred as senior-Accountant Satisfying all the above criteria (a-e) with CA/ ICWA / MBA (Finance) then be refereed as manager (Accounts) Read all the above information and answer the following question Shravani has passed H. SC with 72% of marks. She has done diploma in accountancy with 62% of marks. She was working with an organization in the field of accounting in the field of accounting from 4 years and was drawing CTC of 6.5 Lakhs presently. She is 28yrs as on July 2018. She may referred for the position of:
The following are the conditions for selecting list of a suitable candidates to be called for interview after the written test for the recruitment is conducted/ organized for management-level persons of a multi-national company. For providing accounting services and sales the candidate must (a) be holding a graduation in basic science with 65% or above or B.E degree with 55% and above marks (b) have passed the written test with 70% or above marks (c) the age must be in the group 25 to 30 yrs as on 1/4/18 (d) have experience in an accounting firms for three yrs and diploma in accounting with 60% or above marks (e) be presently drawing CTC of 6 Lakhs per annum and above In case the applicant who satisfies all other terms above except 1) at (a) above, then be referred as Junior Accountant 2) at (d) & (e) above then be referred as Trainee-Accountant Satisfying all the above with experience of 5 yrs then be referred as senior-Accountant Satisfying all the above criteria (a-e) with CA/ ICWA/ MBA (Finance) then be refereed as manager (Accounts) Read all the above information and answer the following question: Radha Mohan has done her graduation in physics with 58% of marks. She has passed the written examination with 76% of marks. She is 27 yrs as on June 2018. She has the experience in the accounting company for four years with salary of 7 Lakhs per annum. She also has passed diploma in accounting with 61% of marks. She may be referred for the position of:
The conditions regarding selection from a list of suitable candidates to be called for interview after a written examination for appointment of management-level persons to a multi-national company providing accounting services and sales are mentioned below. Candidates: a) Must have a Bachelor's degree in Basic Science with 65% or more marks or BE with 55% or more marks. b) Must have passed the examination with 70% or more marks. c) Age must be between 25 to 30 years as of 1/4/18. d) Must have 3 years of experience in an Accounting Institution and must have a Diploma in Accounting with 60% or more marks. e) Must be currently getting CTC of Rs. 6 lakh or more per annum. If the candidate: 1) If he fulfills all the other conditions other than A above, he will be designated as Junior Accountant. 2) If he fulfills all the other conditions other than (d) and (e) above, he can be designated as Trainee-Accountant. If he fulfills all the above conditions including 5 years of experience, he can be designated as a Senior Accountant. He can be designated as Manager (Accounts) if he fulfills all the above criteria including educational qualifications of CA/ ICWA/ MBA (Finance). Study all the above information and answer the following question. Varun has passed the CA exam and has a bachelor's degree in basic science and a diploma in accountancy, having scored 75% or more in the written examination during his entire career and also in the written examination. His age is 27 years and with 4 years of experience in Accountancy, he has a CTC salary of 18 lakhs per annum. To which of the following positions can he be referred? Select from the given options.