You are on page 1of 19

Page No.

MANJARA AAbLE TnUST


INSTITUTE OF TECHNOLOGY, MUMBAI
RAIIV GANDHIVERsOVA LINK ROAD,VERSOVA, ANDHERI (WEST), MUMBAI 53
JUHU

2petlmai No:.

împlementuwo oc Accernbleh
Aim- maam u

Theo rdtten
Acsembletsic apaham dor convertig înweienu
n Jowleve_ascermblu cae into maabihe Code and eneAatina
oa two paac
alma fnoumahico ooade.he advaniege That tic Lzed
AAmernbleA ove a linglema aMemble ane
to elinainate dorwudelelen.ce noblem

Pies-T ascemblea adlaoithn

heain
sadia4 addseacaen
LocR=Alastin_addrec
else
LOCCTR = 0
while ofcoDe END do
beaîn
ea a ine on he Ccole
fhe ic a abel
it Thie Yabel is in g¥NTAB, hen ea
ece înseAt Nabel loccTR) into yNTAB
SeaachOPTAB CMbI) foy opCode_
and
LOCCTR =N
elce his is an acsermb direefive (foT)
. W.
LocCTR aA dreetion
Upde
elce es0o
Toitfali2e

Read

Shm
Shorot in
lae ST with
on Co

TyPe?END ofo
Ceorth Po0T
DS
pc

data
Deleamine lenath of
Seaneh MOT pare2ejus ed

pdale
net ngth of PoceC
Heals LLe
hsChon

PASS-1lourheat
MANJARA VANarabLe TRUST Page No.
RAJIV GANDHI INSTITUTE OF TECHNOLOGY, MUMBAI
JUHU VERSoVA LINK ROAD,
VERSOVA, ANDHERI (WEST), MUMBAI
53.

wnte gine to fotenediake ie


end
prooham gi2e= |OcCTR-stufing odees

Pasc L 0sceme_degnilhm
beain-
Sreod a ne;_
torode =START Then
wite herde hecovc
whle opode END do
benin
Seduh oPTAB or oprode

the Oeland ica mbo) Then


heplace i t l h an oddece_xina SyNTAB
acem de th obect cocle
eleitic a dend divetive
conneat it b opect code
odd objel code o text
eod nex ne
end
UWte eND etovd to text,
ovtpot txt;_
end
Tnitialize

Read
eND - cleonU
OUNDD
T PE ond ei
eudo op Tale
LPO13,
POTAEL
NOT FoUND (onyt and
DS
Seoch Machine
OP Table
Deemine lensl
MOTGETL dala cpare

Caet ingmetion Trdicale awalade


Renath tyPe nd
nam Cocle
Tnditae nava
cable Bone RPgiten|
vcalua le opesa nd
erpsecsion bu
SeorrthingAymbo
STCE

Accemble tcaelhe
the penH, o h
h etion

updale
ocahcn Conk

PACS-flourhast
Page No.( K
MANJARA lAuTakLE TRuST
RAJIV GANDHI INSTITUTE OF TECHNOLOGY, MUMBAL Get next
JUHU VERSoVA LINK ROAD, VERSoVA,ANDHERI (WEST), MUMBAI 53.
token
Dmal s dattabacee în Paac-TT

MOT CMachine Opcade Tade)


pinan
Mnemovnic Bnan Tnst Tncm
0plode OPLoote lenah formert
Ccha Chex) CGnaM). choinorn
MoN E

POT CRseudocode Opcoole. Table)


Pseudo-Op Adarrecs omobne
Ccho tobe prrcecc
START PIGTAR3

T_Cymbol Tabe)
mbo Nalue | lenath Reloation
chu) hex) Chex)chaa)
O00C 04 R"_

L Citea Table)
Litena Addece

fovmad dapbane n Pass-T


Rass 2 n Jane co MO POTSTard ocation
Covnk drom acc-1'0
Ttha 1 extra talde Pane Tade
Page No.
MANJARA VAaurabie TrUST
RAJIV GANDHI INSTITUTE OF TECHNOLOGY, MUMBAI
JUHU VERSOVA LINK ROAD, VERSOVA, ANDHERI (WEST), MUMBAI - 53.

BT CBeue Tade)
Avalabil Conenk ne
Tndicotos nea
chau Ches)
"N'
000000

onclucion:-Tlence, Ihave ucrecehollu Ahudied and implemnted


wo Pam owMermble.
MANJARA
RAJIV GANDHI INSTITUTE
uabuu vnIST Page No.(

JUHU
OF TECHNOLOGY, MUMBAI1
VERSOVA LINK ROAD, VERSOVA, ANDHERI (WEST), MUMBAI -

53.

Enpesiment No.
Atm-0giam to implement two pac Macro wceco

Macnopw¢eCcos takel_a Rovne PaAam Containira


maco deantion andmarm Cally T tordenk it into aderm
anewc
XanopaaL peaorm wihoUt macvooleinti on or cclls. A
Maconahdcion ic the notetionay comenience for he pregamroel
eve occuTTence o mao The whde macvo bod &
mac oc e laterNents 2et enunde in the main
ote co dle. Rus, maco inmbetionu_mate uvtina Code
mae
Conven'ient

Pacs alprlhm
Step Itialize MNTC CMaco NName lable) Cownle= O cnod
MDTC CMao dlelintion Table coonle)=
Scan dp au macro olelznitionu 0n by- ont. TMACRO
dound in pogAam Then o each maco peem pepm
2 : MNTC= MNTC +|
:2 nea name MARO in MNT CMace Ndme ble)_
-33 ho oVeuhddeltaemert MDT=MDTC +)
Enteeention c MACRO in MDT CMAo
delnition ade)
&S: eneate anaument c t aaA.
Cleps: Énd
AMDTC-1
MNIC

Read next
SoUme cale

MACRo
PSE UD o
NO
Umle
o
co
coUne tode

END NO
eS PsEUDO
Pead nert
Seetcole YES

oto
EneMaoname Pas-
and cusTEni
Nalue în MNT
and MNIC
Reca next
Coume cord

MNTCEMNTC+ behite nde


notu tion o
IAxGUnents

Pregat eng list


Eale 2ineinto
IDT-

MDICe- ADTC4)

No

PSEOD
Page No.
MANJARA kurabue TRusT
MUMBAI
RAJIV GANDHI INSTITUTE OF TECHNOLOGY,
MUMBAl 53. -

JUHU VERSOVA LINK ROAD, VERSOVA, ANDHERI (WEST),

Pass-T algortkm.

Step 1: Scan main am doy macro cal


Step : for eochmdo cellpetom and o H oddrenen
Ql Scan MNT o detect Maero
name

in MDT cMaro Delunitlon Talbe)


Replace al dorma ometeA t h ahual pauameeu
.3: Replace Mac call Mdel fmenk fmm MDI
Step 8 END.

Darabages 0sed tn Ass-T

MDT CMao deintion alle


nder Caro

STR AB Aa, A1, A2


A 3H 3

12 A 1,#1
A2,t 2
MEND

MNT (Mne NamuJabe)_


Thdex Name MDTindex
PACC 2

Sarch MNT
for moteh uwth
Lo peAaRon toce.

MACRO No wrdle inho exareed


name fan 90UMe Cod e

NP
stUDo OP
YES
MOTP MD
index rom
MNT entn NEs
Supply epandcd
SoUme
Sehp nqumeri CLscemea protel

MPAOTPA
Cnet Line&om
MD

d e enparded
ovrae Lode

Pasc+lourhat
MANJARAaurabuu TRUST Page No.
RAJIV GANDHI INSTITUTE OF TECHNOLOGY, MUMBAI
JUHU VERSOVA LINK ROAD, VERSOVA, ANDHERI (WEST), MUMBAI 53.

ALA CAqumert iet Aoy)


TMen Arvedmem.

RI b
Ra bbb |

MNTC CMatname able Coune) : Thisorefhe numbe


ine in MNT
MDTCCMaco delntion ooonea ): hisove The numbe o
inu in MDT.

Daeye Used in a T

TheXame dlotabone qeneiatd g-I


Fken_Us
ALA wheie al omauameteu ae
Onl_diHeence ic in
0.2plared by Ochva puametu

umesshl hudied and implernenl


Conclusions Hence Thave
hulo pa Mampcescor
Page No.
MANJARAVIurakiLI TRUST
RAJIV GANDHI INSTITUTE OF TECHNOLOGY, MUMBAI
JUHU VERSOVA LINK ROAD, VERSOVA, ANDHERI (WIST), MUMBAI 53

apelmer Nos
Aim; Pham o plenet Ttemedicte Code berneiation (TG)
phaeocompiles (Ovacruple)

Theoc
Aoume tocde can_divety_be ranalarted ito e
Mget codle The eauon_wheneed a inteAmediak_Lode is
ta compilea sanulates fhe Aoumeanaucae to jaugek
mle anauaye. uwo having he ptton dor aenetating
inteinediate Wle then a c neua 'me eea n
native tonpile is adredTtelmeterte code elminate
he need a new comple dor eyea uniqe me
Code bypeepina the Cinalysis pochon Aare or all
COmpile
Tree Adnecs (ades
T a t4pe oineaneliak code which is etogeneale
and (an be _ey onveded omachine cae.Tmaet
Use rtmost Thee_addnesses Cind one opeaor-to_
hepseert_on expsekon and he volue compued ctt each
inuchon ieosed in temporaily Nadable o bu
Compie Thee a 3 egventatidn thee addrt
Code
0 0 Tipel-TRis hepretertahion_dcomt make uxe o exa
tempo ranu NOuialble apveent a Ainale bpeNationInuad
when ahelaene to_ahohe shude vdue k heele_a
poinle the tht iee isUse ot conist onlu 3
hields rMmdy Dphe1 and na&
Thee Addhces. (adc
t y
t2 z2
3 4A2

O e Reprelentetion

OP
Ar2
() Z

2
Z
5) + 4)

Tndreet Taple Reprexenterion Lis ot poinders


OP Ar 1 Avn 2 shvcre
C41)
+
6) C1)
C14) C14
8) + 16) C9

Auacdvpe PseAenierhiom.
oP r A 2 Reu
t2
3
t2
MANJARALikRak1E TRUNI o
Page

RAJIV GANDHI INSTITUTE OF TECHNOLOGY, MUMBAI


ANDHERI (WEST), MUMBAI
JUHU VERSOVA LINK ROAD,VERSOVA,

mar e u poinle
Tnah sed tiplet Thishepmeletation
aueelence to Compunu uhith
to he ichn o (ormpned
s made Aepondfelyand tore n utiliy an
qvodhople epheenction t rRineXeu Apare
than t
heldu
uedrupe:- Tt is uehe wheh convis e 4
enaku dhu.
namely op g1, Aa A n d hetult op
Ang_lenok he 2opeAcctus
DoeAkosand Ag 1And
to The_hewt e ehpion
eAultiYeed
an

Juteu áullAidied
an
ente, ave apaclnogle)-
lonclocon lnertn
Inglemeeted Jnlkemadakk lade
MANJARA UA ABIE TRUST Page No.(
RAJIV GANDHI INSTITUTE OF TECHNOLOGY, MUMBAI
JUHU
VERSOVA LINK ROAD, VERSOVA, ANDHERI (WEST), MUMBAI 1

Epeliment Noz-
Afm- og2am to implement tode opiiml2ation
lrhnique
Theor
Ihe_tode pptimization in he_lylhenis phau ic a
pgttam tianzonmation technique ien o poe ihe
nteumecdiate code by makin t_(onwm teuwe 'heunuMe
la that aate idnning Omachint Codz2 ill
geault-
campile0ptimi2ina pmceh4- hosla ouet fhs dollouing-
obieelive
Th optimi2ation must be_comect_t md nat in_AnyuA-
chanaeIhe way M pram
Dpininaion hosldinrean Lpeed and eamrmante
thpasam
ih Complhon ime must_be kept geannnabe.
h cpBmi2ation pacceccRhould na delayThe Oveaall
npilingdeahxe.
Code Optimizaion ehnigues
a ommon_kuh- bparestion Elimination?
he eapescion. THat_han peen elneady_omput belere
Anc appeau again in fu mde Jor compoehion tall=
AA LdmmonXODcquenie.

ode Movmeatt
Souelva moucmzn effhe tde The tode tpeent intede
-tineleep
tbe leep moved cufft doe_not matHe whetea
peent inuid en~ide
Dead coode
mi ncrhio
ode
MoNCmert Conutunt
Folding
Cornpile Time
Eatvaio
Code aptimizotion
Teertqve
ontet

frponcrton.
/hrerisfh
Reduchon
Cornpon ub
EpntuionZiminathio
AA T
ICT Page No.
D
MANJARA
MANJARA CHARUTABLE TRUST
RAJIV GANDHI INSTITUTE Page No.

JUHU VERSOVA LINK OF TECHNOLOGY, MUMBAI


ROAD, VERSOVA, ANDHERI (WEST), MUMBAI -53.
Dead Lode tlimhatan
4 involve _elimina-ingthe
Lode which elamd code Thi Ademerh
0
eithdheve exute es a unheadable
heixolp is_peve tted ei eliminaied.
Aungth Redurhoni
A th namL Jugglak it fnualuzA
e ecsion. Ttahntque Aarucing the lhengih
eplace Tyerpenhy and
Coski opeiatos th thi Limple_and
ampile ime aluaton
Two echndguEL hat stallu inda tonmpile tme
ontat Propoaatian _evalvctinaut
Lpmu yaslable h been_aschned_Jemu_onhani valuu
Hhnt
thin_ eplace hat vauiable wth tk_ontad value
in he qiihen_tmgham ing cempilation

Lonutant pldings
Th thifehniaue he nane uggeat it_inuae_doldhne
th censtant. "The enprcion nat tontain th_otrdot
Juaving comant vala at_ompile fime a evaludked.
Thoses
Thosed eprcionau Thun heplarzd with theth
uepehve Jevl.
_tot24t dameteu
Compfl eNaluake _at tmpile im
Than,it i eplard hy g/4 tn The eMprtion
Page No.
MANJARAUilAurabILE TRUST

RAJIV GANDHI INSTITUTE OF TECHNOLOGY, MUMBAI


JUHUVERSOVA LINK ROAD, VERSOVA, ANDHERI (WEST), MUMBAI 53.

Snpesiment No-

Aim r0og.am to mdenmer Code Genelation Phane oompie

heom Code genelation can be conihneke an he i n


Pho Comptlatdon. Touah gost code geneiaHon, ua.
optimibongoocens Can be onThe code bot
1hod doun beeen a a pat olode geneiationghaat
el The code geneakd he compilel te an
ohet code _Rohe Lowes UWeve opammi na Jana
AAembly_Xangvaae

ade Genesator is used to pwduce Th tage code tor


ee caddsem Jukrnemk: vse reackao Aloxh
Opeanda h Lwe addreuLement

Cnde deneadtion Algehm:


K alaorahm utei a eauence e cddreu
Rtakmhk_ou inu for bach tHLee_adehren_dtudement
peActornhe votou detiona

0 huoke a doncion qekea to ind out tuucartan_wheu tu


euH COm pohon h lheoebe Poved.
londH addremdeaciption fon y o deleimine
naue Nalue Corsroentt memr anel
eadin hath thn easomh Seatsle y: 2Thi vabe
not_2lheooly in L hn Aeneaak fhi îh1huction
to placeatpy in L
Page No.
MANJARA EHARLTABLE TRUST
RAJIV GANDHI INSTITUTE OF TECHNOLOGY, MUMBAI
JUHU VERSOVA LINK ROAD, VERSOVA, ANDHERI (WEST), MUMBAI -53.

beneaale h inuutionOP 1 whtuk ued dto houw


tae ument_Xocrton 2 zicinbath fhen pree
Paaclea to mornca ocahon Ugdok te addseiA
deariplo1 ox ho indicak eat xk in Xorcrion
x ic in hen updak i deaci pta and hemave om
6he dencaphor

he unreni Nalue e u orz have ho néxt uced or


AMeon bem 1de plotk i n aeqtdleu n a k
ha eeise oleatriphor to ineizak fhd aka
_entuhon here_egides killno Jona
a02hee
Conkain o x 2

X 2
MON2o
ADD

lonclusionslence Thavtuetelatu lneeatipo and


implern.ent.ed The tontept e lndehtneuahon h Phosce
onplea

You might also like