Professional Documents
Culture Documents
Mpi 2 Unit
Mpi 2 Unit
PagoNo.
e
irlay UNI7-2
Sotulase0se.chitectur Kegisteng /oqse
mmin model egiste3085-Mio-ohtocessm.
8hine 16 line
--
OPCede ohercend -w *
1perahi'onbefoimed bying41uc-hon.
2)Length theinstxuchah.
3Addeessing made. heinst1uchion.
Fape NG
besftme by nstxuchion
hexation
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
STAx, Rp ***
R by-teingfuchion
2 machine.Cycle
1 1 State
Inodizect adodtessing moade.
Nal a q s aLectdol
J PcHL **
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 *
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 **
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
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.
raleectQololseessing de
lags aeeet fected.
Conoltia naL *****
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
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
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
Techniue_
Tndecing
2Counin
2xanchthg
Inde cing t T hoinL_he 1extcata..
fo that Enol he
ounthing - lo Ezunt
available olota.
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
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.