Professional Documents
Culture Documents
- Apeksha Gopale
Pass 2
Relative add. Mnemonic
inst.
PG3 START
USING *,BASE
SR
SR 2,2
SR 2,2
2,FOUR
L 2,_ (0,_)
L 2,18(0,12)
2,FIVE
A 2,22(0,12)
2, = F 7
10
A 2,_(0,_)
10
A 2,30(0,12)
ST
2,TEMP
14
ST 2,_(0,_)
14
ST 2,26(0,12)
FOUR DC
F, 4
18
18
0100
FIVE DC
F, 5
22
22
0101
BASE EQU
12
26
26
TEMP DS
1F
26
26
30
30
END
2,2
A 2,_(0,_)
SYMB
OL
VAL
UE
LENGT RELATIVE/ABSOLUTE
H
PG3
FOUR
18
FIVE
22
BASE
12
TEMP
26
LITER
AL
VALU
E
LENGT RELATIVE/ABSOLUTE
H
=F 7
30
Br NO
Availability indicator
NO
NO
12
YES
00
15
NO
R
content of BR
1.Pass 1.
2.LC = 0.
3.Read Card.
4.Search POT ,
IF found GOTO step 11 ,
ELSE Search MOT & GOTO step
5.
5.L= length.
6.Process if any literal present, enter
it in LT.
7.IF symbol present Assign current
value of LC to symbol
8. LC=LC+L.
9.Write copy of card to use in pass 2
10.GOTO STEP 3.
11.Find type of pseudo-op code.
1.Pass 2.
2.LC = 0.
3.Read Card from file copy.
4.Search POT ,
IF found GOTO step 13 ,
ELSE Search MOT & GOTO step
5
5.Get bin op code, format, L= length.
6.Find instruction type
(RR/RX/SS/SI/RS)
7.IF RR, evaluate both reg. exp. &
insert into 2nd byte, GOTO step 9
8.IF RX, evaluate reg. & index exp.
And insert in 2nd byte, Calc. EA of
operand, Determine
displacement(D) and base reg(B),
put B in 3rd byte & D in 4th byte,
GOTO step 9
9.Punch assembled instruction.
l
l
l
Data :AX BX CX
DX (16 bit)
Index: SI DI
Pointer:SP BP
Segment: CS DS
SS ES
l
l
l
l
l
DB 1
DW 2
DD 4
DQ 8
DT 10