!"#$"%&&'()'(*%+,)%-,#.()/(0"#1'22'/"((3!4567,-2(
!
Adresse&
Mem&en&&
hexa&
Instruction&en&
binaire&
Interprétation&
Valeur&Accu&
Mem&en&&hex&après&
exécution&
Mem&en&&binaire&après&
exécution&
00"
86(
88(((889888(
:334(;(:334(<=>(
?'&@6A(
%*%.-(88888888(
%0"B2(88888889(
C(
C(
01"
DE(
89(((888999(
:334(;(:334(((F(((
?'&@EA(
%*%.-(88888889(
%0"B2(89999999(
C(
C(
02"
6G(
98(((888998(
?'&@GA(;(:334(
89999999(
C(
C(
03"
3D(
99((888988(
30-5,.2-"/1-,#.(;(8D(
89999999(
C(
C(
04"
3D(
99((888988(
30-5,.2-"/1-,#.(;(8D(
89999999(
C(
C(
05"
88(
88888888(
)#..H'(
C(
88(
88888888(
06"
88(
88888888(
)#..H'(
C(
EI(
89999999(
07"
EJ(
89999998(
)#..H'(
C(
EJ(
89999998(
08"
IJ(
99999998(
)#..H'(
C(
IJ(
99999998(
(
J.("#/$'(K( (+'2(,.2-"/1-,#.2(&H&#",2H'2((((((((J.(*'"-(K((+'2()#..H'2(&H&#",2H'2(
(
(
!"#$"%&&'(!L3M(2/"(0"#1'22'/"((3!4567,-2(
(
Programme""assembleur"du"PGCD"(a,b)"
"
"
start":"
NOR"" " allone;"" " " Accu"="X"NOR"11111111="0"
NOR"" " b;" " " " Accu"="not (b)"
ADD"" " one";""""Accu"="not (b)"+"1="H"b"
ADD"" " a";""""Accu"="a"-"b"
JCC"" " neg;""""si"carry="0"alors"neg""sinon"carry=0"
STA"" " a;" " " " a=Accu;"
ADD"" " allone;"""Accu"="Accu"+”11111111”"d’où"carry"=1"sauf"si"a=0;"
JCC"" " end";" " " " si"carry="0"alors"end"sinon"carry=0"
""""""""""""JCC"" " start;""""carry=0"donc"start"
"
neg!:!
NOR" " "zero;"""""Accu"="Accu"NOR"00000000="not"(Accu)"
ADD"" " one;" " " " Accu"="Accu + 1"
STA"" " b;" " " " b=Accu"
JCC" " start;"""""si"carry="0"alors"start!sinon"carry=0"
"
end!:!
JCC"" " end!;&&&&carry=0"donc"end!"(le"résultat"est"en"b)"
"
"
Exemple"d’application""du"programme"PGCD"(a,b)"pour"a"=40"""et"b=24"
"
Premier"exécution":"(a"=40"et"b=24)"
Accu"="0"
Accu"=NOT(24)"
Accu="NOT(24)"+1"="H24"
Accu"="40H24="16"(carry=1)"
JCC"(carry=0)(
a=16"
Accu="16"+FF=0"(carry=1)"
JCC"(carry=0)(
JCC"start!
"
Deuxième"exécution":"(a"=16"et"b=24)"
Accu"="0"
Accu"=NOT(24)"
Accu="NOT(24)"+1"="H24"
Accu"="16H24="H8"(carry=0)"
JCC"neg!
(
"Accu="NOT(H8)"
"Accu="NOT(H8)"+1"="8"
b=8"
JCC"start!
"
"
Troisième"exécution":"(a"=16"et"b=8)"
Accu"="0"
Accu"=NOT(8)"
Accu="NOT(8)"+1"="H8"
Accu"="16H8="8"(carry=1)"
JCC"(carry=0)(
a=8"
Accu="8"+FF=0"(carry=1)"
JCC"(carry=0)(
JCC"start!
"
Quatrième"exécution":"(a"=8"et"b=8)"
Accu"="0"
Accu"=NOT(8)"
Accu="NOT(8)"+1"="H8"
Accu"="8H8="0"(carry=1)"
JCC"(carry=0)(
a=0"
Accu="0"+FF=FF"(carry=0)"
JCC"end!
JCC"end!
!
"Le"résultat"est"b=8"
"
"
Adresse&
Instruction&en&
décimal&
Interprétation&
Mem&en&&hex&
après&exécution&
Mem&en&&binaire&
après&exécution&
00"
88((((898889(
(((((:334(;(:334(<=>(?'&@9EA(
C(
C(
01"
88((((898989(
(((((:334(;(:334(<=>(?'&@O9A(
C(
C(
02"
89((((898898(
(((((:334(;(:334(((F(((?'&@96A(
C(
C(
03"
89((((898988(
(((((:334(;(:334(((F(((?'&@O8A(
C(
C(
04"
99((((889889(
(((((Q33(R?'&@8PAS(,T(1%""U(;(8(
C(
C(
8N(
98((((898988(
(((((?'&@O8A(;(:334(
C(
C(
8G(
89((((898889(
(((((:334(;(:334(((F(((?'&@9EA(
C(
C(
8E(
99((((889989(
(((((Q33(R?'&@9VAS(,T(1%""U(;(8(
C(
C(
86(
99((((888888(
(((((Q33(R?'&@88AS(,T(1%""U(;(8(
C(
C(
8P(
88((((898899(
(((((:334(;(:334(<=>(?'&@9PA(
C(
C(
98(
89((((898898(
(((((:334(;(:334(((F(((?'&@96A(
C(
C(
99(
98((((898989(
(((((?'&@O9A(;(:334(
C(
C(
9O(
98((((898989(
(((((Q33(R?'&@88AS(,T(1%""U(;(8(
C(
C(
9V(
99((((889989(
(((((Q33(R?'&@9VAS(,T(1%""U(;(8(
C(
C(
9D(inutile)(
99((((889989(
(((((Q33(R?'&@9VAS(,T(1%""U(;(8(
C(
C(
9N(inutile)(
99((((889989(
(((((Q33(R?'&@9VAS(,T(1%""U(;(8(
C(
C(
9G(inutile)(
99((((889989(
(((((Q33(R?'&@9VAS(,T(1%""U(;(8(
C(
C(
17"
99999999(
)#..H'(
II(
99999999(
18"
88888889(
)#..H'(
89(
88888889(
19"
88888888(
)#..H'(
88(
88888888(
20"
88989888(
)#..H'(
88(
88888888(
21"
88899888(
)#..H'(
86(
99999998(
( (
J.("#/$'(K( (+'2(,.2-"/1-,#.2(&H&#",2H'2(((((J.(*'"-(K((+'2()#..H'2(&H&#",2H'2(
(
(
(
(
(
(
(
(
1 / 6 100%
La catégorie de ce document est-elle correcte?
Merci pour votre participation!

Faire une suggestion

Avez-vous trouvé des erreurs dans linterface ou les textes ? Ou savez-vous comment améliorer linterface utilisateur de StudyLib ? Nhésitez pas à envoyer vos suggestions. Cest très important pour nous !