19 19 votes The purpose of instruction location counter in an assembler is _______ Compiler Design gate1992 compiler-design assembler normal fill-in-the-blanks + – Kathleen 7.5k views answer comment Share Follow Print See all 5 Comments 5 5 Comments reply Show 2 previous comments razvardhan commented Dec 27, 2024 reply Follow flag i have the same doubt . 0 0 replyShare Surya013 commented Jul 12, 2025 reply Follow flag Is it under the syllabus this year ? 0 0 replyShare Raj_Dev_Verma commented Sep 26 reply Follow flag the location counter keeps track of the current location in storage. 0 0 replyShare Please log in or register to add a comment.
17 17 votes Each section of an assembler language program has a location counter used to assign storage addresses to your program's statements. As the instructions of a source module are being assembled, the location counter keeps track of the current location in storage. Rohan Ghosh answered Jun 25, 2015 Rohan Ghosh comment Share Follow See all 6 Comments 6 6 Comments reply Show 3 previous comments Ayush Upadhyaya commented Nov 2, 2018 reply Follow flag https://www.ibm.com/support/knowledgecenter/en/ssw_aix_71/com.ibm.aix.alangref/idalangref_loc_counter.htm 2 2 replyShare S Ram commented Jan 12, 2019 reply Follow flag In intermediate code generation stage of a compiler we often need to execute "jump" instructions to places in the code that don't exist yet. To deal with this type of cases a target label is inserted for that instruction. A marker nonterminal in the production rule causes the semantic action to pick up. 0 0 replyShare mohan123 commented Sep 23, 2019 i edited by mohan123 Sep 23, 2019 reply Follow flag What is the use of assigning storage location to each statement? i think this processes done in pass 1 phase of compiler after that generate data values defined by byte ,word and perform processing of assembler directives not done in pass 1. @Bikram @Arjun 0 0 replyShare Please log in or register to add a comment.
8 8 votes $\underline{\textbf{Answer:}\Rightarrow}$ $\underline{\textbf{Explanation:}\Rightarrow}$ Purposes of instruction location counter in an assembler are as follows: The location counter checks whether the next available memory location can be assigned within the present (current) segment, such as code, or data. In other words, it contains the offset of the instruction or the data being assembled. By default, the location counter starts from zero and increment by one when each byte of memory is allocated. But the location counter may be changed using the $\mathbf{ORG}$ statement. To start the location counter at a particular offset address $\color{blue}{\text{org assembler directive}}$ may be used. http://et.engr.iupui.edu/~skoskie/ECE362/lecture_notes/LN2_html/text8.html http://www.keil.com/support/man/docs/a51/a51_wp_locationcounter.htm `JEET answered Jan 23, 2020 `JEET comment Share Follow See 1 comment 1 1 comment reply S_Sandeep commented Jul 6 reply Follow flag does this comes under COA topic? 0 0 replyShare Please log in or register to add a comment.
1 1 vote In an assembler is used to keep track of where the next instruction should go in memory. It ensures that each instruction is placed in the correct order and at the right location. prasantkr.singh answered Jun 27, 2024 prasantkr.singh comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes same use as instruction pointer in recursion paraskk answered Aug 25, 2019 paraskk comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes The purpose of the instruction location counter (LC) in an assembler is to keep track of the memory address or location assigned to the next instruction or data in the program being assembled. rajveer43 answered Dec 30, 2023 rajveer43 comment Share Follow 0 reply Please log in or register to add a comment.