You are on page 1of 22

Dato

PagoNo.
e
irlay UNI7-2
Sotulase0se.chitectur Kegisteng /oqse
mmin model egiste3085-Mio-ohtocessm.

Hccumulatas lA). Tlag Registe


N
8 bit)
Co8bit)
Dl8bit£l E 8 bit
6bit bit)
SP)tack_hoitese.14 bit).
(P Pscoqam CnLDte 6 bity

8hine 16 line

Data bu ddsie s9 bug


(Bidieec-ional) (unidieechoral)
heblogscamming macel BoB5 MictobxoCesso
ontain Vaseious8-bit 16-bit eeqis-teg
Keistes ea.cualyaget flp-£lops..
Kegiatesaeusedt3 Stoxe_lata tempor.
lasilye xecessing.Enadmous olata is starsol
inmem8 Lhíchson a sebaaate chib
hence mebme isCansumedfo accesg
data o oemb by-he mioeplocess

hexelerethe data _tWhichneed pIocessing


CsceCahiee ircto. egisteres ulithin
miCrobtocesset foSave-ptoce.ssing mc.
Datd
Pego tle.

--

tClassificatian Instruction geti=


Tnstruction faxmaf
Ins+TucHom

OPCede ohercend -w *

Ma neneral burpoe egrt


Mov BO8
mnemonicg
tHesey Mov=Dh Cade 4 B, C 0bereno

Each insdsuchion BaB5 miCxopocessp has


fulaShecitie information elos ene is he
ohex.atran. de ohCade) whichsheCiHy the
chexationtothe beLoe.haeol

Thebes-ahorn isshe.ciheby birauGde


hence he12a me isohecaionCole
eCand1shecenalWhi'ch Sayabout
he olota on Lhichtask. ope easmed

Classikatian. ingtucbgn get2


hewhale. instiuc-on Sad.anbe. Classi
in-to olferent oteguies0nthe basis
three ollesertCiteriai
-r

1perahi'onbefoimed bying41uc-hon.
2)Length theinstxuchah.
3Addeessing made. heinst1uchion.
Fape NG

besftme by nstxuchion
hexation

Data bseans/la caup Instruehiona

lalMovCMave) R4,-R i Grka'n Salusece tegiste


Moue he Ghy
to desinaion scegis-tese
byte instruchon
Regiskere adoseessing.
machine Cycle
-1 State
Nala affecded.

lbJMav R, M
M=memt baintesebain-bin the memb
lenCaionWheseadldse29 i staseein
H-Lbai
Move the opy lontain m e m
lnCohiontohnse adldiess in HLbais t
egis tese R
byte instzuchon
2 2 machine Cycle
2 7 T state
ndisect addbuessingmode.
No4laq isa/fecteo
cjMVI R, 8 bit
Move immeainty8 b i t d a t a o R
l hyte inLruchon.
2 machine Cycle.
1 state.
haade
n mcoliale addbcessing
s afec Yed
No fla
dMvI M, 8-bit dada
locaiorn uhoce adoseeg2
M memo ade.
in HLpair bit odata to g.
ave immadiat
2 byte nstruchon.

33 hmachine ycle
lb-Tstate
ameoliate Qololbeessing mmde.

No -flag is fecteol

eLxI Rp-l4-bit data


Move Is bit olata immedial in eqiste
haie
3 b y t e instiuction.
machine Cyale
2o-IState
rmeoliote aolobe ssing mode
b-flagisapfecteol..

fLDA 16 -bit _adolress :


Loaol -the accumulato LulGth the antajn
memoy Cohon whoseaddze.es s is 9iven,
ininsfFucion.
by te instiuchon..
Diseect adolxeszing mode.
2 machine Cycle."
13-TL Stale
No fag isare cled.
Ne

91STA 16-bi aalds.ess


SHoehe Gntain aCcumulato
loCationgiven ininsttucfion
memb
3byteinstiuchion
4 ha chine ycle
|13-1 stafe -

Dine cf. addse.escin mode


Nolaq isa/fe.cfeod. **

h]LDax Rp accumllato- lith.Contain


Load-he
memay oCahbnthat adobeesgs fe
Storee in Kp
1byte insttuchon
2 machineCycle
Tnoicec addseessing made.
Nolaq isapecteol.
1 s-fate

STAx, Rp ***

SHorethe ontain ccumulote .


he membr o Cabion Whose aololté 29
iS toe inKp. -

R by-teingfuchion
2 machine.Cycle
1 1 State
Inodizect adodtessing moade.
Nal a q s aLectdol
J PcHL **

Copy he Contain eqisterpaik


R/Paga a

thebregrconn Gentet.
byteinstsuchon
a chineaaldessing
eqistes
Cycle rnde

9 State..
Nolag is affecteol.

KSPHL
Secgiste pal (H
theState
Gr
opy-the Gntaun
bointe
byte instuchian.
måchineyCle
- T state
Kegiste aobressing modle
Nolag is fedel

LJXCH
Exchangehe ntain HL lith D4E
b y bytè instuction. HeD
machine Cycle L6
- 1Stade
egistes adolsessing made.
Nolag isaLecYed.
MXTHL m *

ExchangeHA Lth_dop _he se.


by te instXuchon
5nachineCycle. LSh-
6 T State LHS-
2Regis.tee addeessing. made
Nolagisafecel
2o/May

NHL Dddeess (16-bt)


LeadHLSegStese paise reorr tutd
onCochion
ongecivememky LAdal ve as
3byte. ing ttuchdn
HAeddtes s4.
25 machi ne Cy cle
2Dieectaoldle&ssing mode.
Noflag is /flct ed

SHLD Pdaseess (l4-bit):


Stee Gntains .HLSeCgistee paise
ohise.ectintealoonge.cLutive memo'cy
laCahion
3 byte.instruchon.
H
LDddlsess
5machine Cycle 9l dtess +L
Diect oolobcessJng made
No flaq saèctel,
PIN,8-bit Pert adedbregg
Read8-bit data. in-taaccumulatofton
Il0 clevice Conne.czed a he
miLaokdocess.C
2byteinsttuC-hlon
3 machine yale.
Diect aolde.ssia9 mocle.
loa s pScteol.
OuT8 bit Port aoldsee39 :
useite.8-bit_olata.
ecomaccumuiaIo
into 1/o_device that is onnecte-

Tgiven 8-bit_pat addee9.


2 bute nstiucion.
3 3 machineaolabeessihg
Cycle. made
DLseect
Ne.lag 0fecte

L n s t t u c Hong :
ithmetc

aApD. R
Adldhe Gntouns egiStes tothe
accumulates. 0ano e sult
Can-taune Contain
Setei
innaccumulato

b y t e byte ínstxucton
A A+R
eiste adldressing Mode.
2Aflags a e afdctedacctcding

he.eslt.

bJADDM **

Hol the Contain. o memuy o Cationg


a h e Gntaun
baintedby the HL paise
accunmuatos
byte insttucston.
Tnlect addseessin mode
Aflags peteal acceroling
he eesulU

ADIData l8-bit)
Adol8 bit_immealiate olafa o theaccum
latetcanad9teee he eesul n
CucCumulatoe LA At[8-bt alata
2byte ina4ructhon
2 eoliate adolseessing mode
AL Fag3 Qae peckal aCCelirg
7he

HOSulH
ee

d/ADC Rz
goddthebntent KegiskeRand status
le asccyfla O L he aoten
acCumulat
A+ R+ CY
*****

byte ins£ruhor.
Register addeessing made

********
4 {lags. eàpe.cted

ADC, M
Addthe_anfeat_ oCa-hoobointeol
eneyolaion pointe!
byRegiste bai and statis _ aCasc
re
lagtothe- ontent accumulate
byte insttuchionD A-E[HLtCy
2Tnolisectadlseessing mode
gs e4pecez

fAbI,_data La-bi4/-
Add the entent 8 bit immealiate data
land Shakus Caxteytlag -to theGoters
GACcumulato
22 byteinstruchion A-A +8- bit data
tcyl
mmneoliate 0dolsessin made.
Alags asce aledted
PAD Rp
Addhe Gatent _Registe pa o the-
antent HLpai segiste andeult-
isstezed in HLhais egiste.
2
byte inszuchian HL HL4 Rpee
egiSteseaddseessing mnde maele.
Olyasseylaq isafecteal
hSuB R
Subtactthe ontent the egishes
Registe
beonoheantent. yaccumulat.
byte _insBrucdiotn A-R
2epi&teeaddlessing made
Alagssce4eciea
SuB, M
Subreeact-the Gntent e m ey lo Cadion
aCadhon
ointed_bs Registe pair eeom Phe
the
cntent acumulatoe.
2Lby teinstreuchion. P-A+[HL
Tndieec adolseessingmade.
lags are a/ecteab
M
sBB,M
Subtscact theGntain mem. By Cadior)
bointee by HLbaieand stäkes
Cas lag the ontain
accumulatee
L byrte insttuchion. 9-HL-Cy]
2Indiectaoldseessing mode..
2Alags ealpededaccoscoling fothe

KS81,8-hit data
SubtecactR-bitimmealiate cataand status
Caxu- flag troathe Gntaint
a4lay accumuladota.
2 byte instteachon. A-Data-YJ
***

oemeaizteadebsessing
Aagsaeafecta acceedingtothe esult
Date

Page No.

LINRR
LnCeement the antaintqxeqistes
L byteinsttuchon. R R+L
>Reqisteradolseessing made
6xeluolin the ayflagallflay asee.
pecteL acc din to eeault
MIN R, M
TnCement the ntaint. mem&y lecaion
paintelby he HLpait egistes
1byte instucioa.
2ndicect adelseessing ode LHL LHL+1 {
xclheing- he Cos la
afecte accoeoling
77 t all+lags.asce
NTNXKp=
Inceement he lantaint_ eqistes
baise-
byteinstuction
2Kegistes aololseessing made.
N lags aseahecteal..

DCR,R=- RR-1
peCoement Hhe o0tant Gfregiste
PDcR M
Peceenment he Containt
Dex, Rp RERp-1 memeryboion poi
Decheemen he Cotaint
egistepaie
ate

LogiCal instruchon

AND -ohceation
LegicallyAND the Gntetnt accumulade
uththe ontent eegisteseR
> byte insttuchion.
acloleessing mode.
eaistex A-A AND RI
Anflags seaffe teel.

bPNA,M
L9iCally ANDthe ontent accum ulato
uwith the Gntent memty oation
beinteaby egi'stes paie. (HL)
P byte insttuction..

I n d e c t . adolseessing mode.
9 ) flags a e pec+ LA-AND HO)

C AN1, data -
8 bit
Lagi'cally HNDthe 8 bit immechate _olata
t h he Cantent accumulato
2 2 bte ingt1uchion.
mmecliate aldseessin9 Made,
- AND daa
flags. pecte

OR-cheraion
al ORA, R

LLogiCalhe Gntont
-
LogiCally eRheGn tent accumulsto
eqiste R
byte te ins+ruchon..
Regis YerQdelseCss.ing mecie AE-ACR R
Date
Page No.

A lagsse/pecteol
baRAM
Logicalu oR he Gntent Occumulato
luthheantent memBay acadhion
hoil PeCgisteepal( L
b y t e instrchtn
Indieect adelressingmde
Hl lags aseea/pe teod. _nAoR LHJ
c oR1 8-bitdata-
LegicallyOR the& hit immeodate \dora
Ahe he Gntent accumulato
2 2 bydeistiuchon
emèodiafeadlseessing made
f l a g s Qee t e c t e l -A OR laha
T

X-0R opeseaHon
aXRA R:
lagidally XaR he bLontent
aec
umdatose tdiththe n tent2
eegicftec
byte instuchon..
Reqte alolse.e gsinq made
lags-
lagsaseeaf¥ectel AA koR_R
bxRA, M
LagiCallyXaRthe óntentt accumu 0T-
h dhe Gntent memory ha=
bointeal bsecgsHehaie (2
hte in 3tation.
2noliaect Qololressing mede
A lags ae aeCes. A xOR CHL

XRI,8-bit data:
dota
-bit immeolfate
LegiCahehe
Legicaly xoRhe
u h
2 byte
Content
instxuction.
a ccumulatos..

mode
aneol ate adolressing
A lags ae alfecde [e- XeR_clata
Comleent_cpescahon
ayCMA: Comblement_the ontent accumu-
ate instYuchon
L byte
Impi r aclaleessing mede.
No is fedeal

bCMP,R
ompae he Cantent ei'ste uuTh

he Gntent accumula .ancd


eesdtg substtachonchexahen is
Not Steee.
byte ins41ucton L-R
Kegistes aotolse e ssing made
4lagsflags a e ayfe~teel acceeoling
he esut.

CJCMP M
ambae he ntent e-memSeyCahèn
peintec b egise paiz lih_he
on-tent Caccmulat Fesuw+ is
not StoTe.
byte. instTuchon. -CHL
nelueect acdseecs/ng trode
4 flags. fec tel. accooling
o he eesul.
dC?1 R- bit data
ombace the mm eliote alata ulsth the
he
| 6ntentk
accumulatoe.
2 byte insAtuc-hon -clata
mn ealhate addseegsing trede.
Hflags ofetecl accoteoling
heseesut.
Rotahingopecahion
aRLC
Kotate.accumulato-z e hot aru
Lbyte nsttuc-hlon.
2Implictadolseessing made.
Dnly aey lag
D, D D ,
ecteal.
D D

bRAL
Rototeaccumulatoe lef ulrh
Cocyf-
byte isttuchion
Impli oololseecsing made.
Only Casea lag s fe cteal.
*****

C)RRC
Rotateaccumulateee Sight ulithout ax
NG

byte instuchon.
mode.
Tmpat adblseess
ay tlag
ing s fectel.
Only
d RAR lith asy
o tate accurmulstoe ight
L byte insttuchion
Implie4aololse essing mode.
tlag 'salfecteck.
Ony Ca un Conoli hiona
Beanch instruchbnt-
ancihional
nCendhonal:
a)MP -6-hit address
uncoralihionally to he Sbecihe doldrene
Tump that acleesa._
and staat execuhon tom
2 3 byte ins+zuChion acdolee c
mmeiote aoldsesSing mocde. boogam Guntea
s axe not apdctec.

bCALL-16-b it aolalseess
Jump unondih'onal thespehieo addta
altea Ste-ing he aoddseess next
insttuction man pEeeame.
3 byte instiuchon
arneoliate aolgle.e cs ing mo de.
tlags ate not fe teo

CyRET
Rehsen fTorn he Subtouhine unondihonaly
ectuning addlse.ess Isohtain teom
ale
Pege No.

ackand oadealoptogseam aune


Lbyte instaucion "****

raleectQololseessing de
lags aeeet fected.
Conoltia naL *****

a-anditlon -16-bit aclbbeesg


Junnp toSpeceied acblsee33 ionolih'otn 3
teue
byteinsttuchion. -

Dieectadeluess/ng made
agsQsee checkeonly b tot/fecel.
bC-Gnalihion-lkbit addseeag
CG the Suhtoutin at Shecizheol adolsecag
Colditiong iUe.. acelseegg
bytebyte instrucion
Lerelate acbbeessing mode
lags e Checkeal nly bul_no
ecteol

2Machine ntol instruction=

NoP:
No oheseahion
byteinstruc-tion.
2None.adeleessing made.
ags e 9fecteal.

HLT
Stahe_ Execuhon
Dat
Paga No

byte insttuchion.
None aclolse esing made
asent4fecHcol.
CSTC:
Set Cas
byte byte ins4Yucton. [cy-
>ImblA adolsee ssing mode
Casy is seA anod al 3he
tlags
flaa
aee Not fecteal

dCMC
omplement theCosesey-4ag eye-
Lbyte ingttuchon.. ye-y
LmbliiE aolole.ess/ng mode
Cases
ae
Tallectesl
asesyflo isGhlementecl d all ohe.

31sune
mpHoldseessing medes instue-kon:
The dfeseert ulays hat h a miCoeo
bTOcesSG Can atcess data ase
lese
to
aolaeesSingmode. he brogdamhme
as

Can elere the 4oTe clata in lilreset


ulayg
oB5 mitoptocesste having
having 5 pes
Aolotressing rodeg.
ymecliate addressng mede
In thi's adolseessing madegmephiate
pale
-

lato B_bit
la paset lbitisspec:ied a2
instructlon
he gmeciatedacta. i s ohtend ulilh_ a
egiste cqste þaLBeacCALedro 7o
insttuchlon
faAcL data L8-bitI--SB1
8-bit_data etc
2Reg'stere Adolsee ssing made
Ololx.e ssing mode.
spec-hed that he
Souseceobeeënd,eleshna
both
both tion opese.end
the opeseenols aoeeStore
ineegistese eqstese paiser
Note h e eegisteseaclolse.essin9 mode instr-
uchbodelazte
because heee
in execuhon2
S_na
na-ne.ec To excesg
mem LL4
XCHL SPHL
otenda.
TH ez

Imlat Addlbeesaing mede


Inhis aololeecsingmaclethecplade
selpshecihesthe
this isalgo knatonaolalsee.as oteno
As imblieok
aololee gsing mode
CMA S T c.MC RLCetc.
- - - -

Dieect Adebee ssing made


thi/saololsesing mode he aololeesg
olatasclisectl given
ins4tuchon itsel using it inhex
the
Teptes
CntahbrnI14-bit_aokleess is_usea
the Second &hi'tobyte. ins#ruci/b
Contain his 18-bit alolseess.
8-bit addsegg isLseal the
the seCoral
byte is he 8-bit pert aclolx.ez2-
sHLD ¢dlolseeg9 (16bit) 3 LHLD Adolsee ss ebc.

5 Tnolisect aolaeleessing made


alata is Stod e in
T theaolobe.e9 he name tho
g'ste pais ano
shownin iHstTuchior
giste paie is having inoliced
instruchon rs
then he
mae.
adolxesging Mec.
C M P ,M ANA, M ,ORA ,

Techniue_
Tndecing
2Counin
2xanchthg
Inde cing t T hoinL_he 1extcata..

fo that Enol he
ounthing - lo Ezunt
available olota.

3Branching- Btatc Change. he Sequencee a r


pefsemeod he task again.
6/Mue
Debugging--Pa0g
Debugging
cam is Simlase /o
pregseatm
tioubeshoing a axolhlaree bt 1 is
much mOTe &icault ome clues keeh alet
o he
taqseam to kre abat esea
made by. him. he olehuggi
.

ng byecess Ca
be vded irto frulo paietz.

Statc debugging
Similast
Stah'c de bugging is
Visual insectiongAaseaaa
hascd'ulasee by paper-anolbencel
Check the lo chas and machine
ade
heSome mmon. Esces whi ch &n be
ind a availableinStati
Stathcdehuggirqas
Selec-ing a loeoIg rachi'ne Cncde
pecihn the Luleing
qivin2 lscong oles Eghhigh aolerand
BPeolese
failus.e e Set aakeLlag bejaie USirg
Hum_instrucon.
Jailusee ininolexing and euzhrg.
Failee Clea theacc umulatos LWhen
s U s us eol lea asetheticapereahiong.
tailue to appea+ Cistes
to hen 4
isuseo kack Some olata ke Cak
Dynarmic debup 1$ome.meg even a/tes-
latic_debugging brogseam oloes net k
then he ieCano to ynamic
r r m

de.bugging he ools namit. .ole bugging


Csee
Sinle Steb.
B k_oint

dingle Steb-Single steb key onhe keyboa


Single baas) hmittenhtncdcao a lbuta
executecne insttucehion t aimeard
es hat bre4searmme CaoChecko he
exbectel esu beyanine empey
eegiste and hen Gn-hinue.

Break poit-Break_pelnthcilpzavicled t
aSetuoseeSeaVice zautne hot albun
hepiogsamme oexeCu~ea proqs10m
in sechong Bteak_point_axeeinsext ed in
ptpcan uiing axe sIinsttuChion.
And as h CxecunKeyis_pusheo
execontakesplaceuta theatbieak
oind nd ate ot use Can check
oexbectel eesut_and hen g0 to The
hex bteakbaint.

You might also like