The Gateway to Computer Science Excellence
+11 votes
943 views
The purpose of instruction location counter in an assembler is _______
in Compiler Design by Veteran (52.2k points) | 943 views
0

The purpose of instruction location counter in an assembler is _______

I think for Back patching related work.

Refer ->

https://stackoverflow.com/questions/15984671/what-does-backpatching-mean

http://www.keil.com/support/man/docs/a51/a51_wp_locationcounter.htm

3 Answers

+9 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.
by Active (2.1k points)
+2
What is the use of assigning storage location to each statement?
+4
Labelled jumps maybe.
0
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

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 votes
same use as instruction pointer in recursion
by (457 points)
0 votes

$\underline{\textbf{Answer:}\Rightarrow}$

$\underline{\textbf{Explanation:}\Rightarrow}$

Purposes of instruction location counter in an assembler are as follows:

ago by Boss (19.2k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,384 answers
198,541 comments
105,340 users