Types of Assembler
Types of Assembler :-
Generally there are two(2) types of assembler –
i.
One
Pass Assembler.
ii.
Two
Pass Assembler.
One
Pass Assembler :-
There are two types of one pass assembler –
a) Produce
object code in memory for immediate execution. This type of assembler need not
any loader. This kind of “load-an-go” assembler is useful in a system that
is oriented towards program development and testing. A university computing
system for student used a difficult
example of such an environment . A “load-an-go” assembler avoids the over head of writing the
object program out and reading it back in. This can be compressed with either
a one or two pass assembler. How ever a one pass assembler also avoids
the over head of an additional pass over
the source program, because it is does not produce object program and it is
test difficult for handling the forward referencing problem.
b) This
type of assembler produces object program where external working storage
devices are not available . Such assembler may also be useful when the external
storage is slow or insufficient to other reasons. One pass assembler that
produces object program follow a slidely different procedure form the first
type of assembler . When the destination of a symbol in encounter, instructions
that made forward references to that symbol may no longer be available in
memory for modification. In general, they have already been written as a part
of test records in the object program. In this case the assembler must generate
another text record with the correct operand address. When the program is
loaded this address will be inserted into the instruction by the action of the
loader.
Two
Pass Assembler :- In a two pass assembler , the fast pass as only to define the
symbol and the second pass can them generate the instruction and addresses. The
general task of two pass assembler are as follows –
a)
Pass – 1 :-
Purpose : Define symbol and literals.
Activity :
i.
Determine
the length of the machine instruction.
ii.
Track
of location counter.
iii.
Remember
values of symbols until pass – 2
iv.
Process
sum pseudo operation.
v.
Remember
literals.
b) Pass
– 2 :-
Purpose : Generate object program.
Activity :
i.
Look
up value of symbols .
ii.
Generate
Instructions.
iii.
Generate
data.
iv.
Process
pseudo operations.
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment