diff --git a/soft/PjtKEIL_StepSon/Src/GestionSon.s b/soft/PjtKEIL_StepSon/Src/GestionSon.s
index db0ae7c..012fa80 100644
--- a/soft/PjtKEIL_StepSon/Src/GestionSon.s
+++ b/soft/PjtKEIL_StepSon/Src/GestionSon.s
@@ -36,8 +36,15 @@ CallbackSon proc
push {r4}
push {r5}
push {r6}
+ push {r7}
+ push {r8}
+ LDR r7,=LongueurSon
+ LDR r8,[r7]
LDR r6,[r3] ; dans r6 la valeur de indextab
+ CMP r8,r6
+ BEQ Fin
+
MOV r2, #2
MUL r2,r6,r2
LDRSH r4,[r1,r2] ; dans r4 l'adresse de son[r6]
@@ -56,14 +63,23 @@ CallbackSon proc
add r6,r6,#1
STR r6,[r3]
+ pop {r8}
+ pop {r7}
+ pop {r6}
+ pop {r5}
+ pop {r4}
+ BX lr
+
+Fin
+ MOV r2,#0
+ STR r2,[r0]
+
+ pop {r8}
+ pop {r7}
pop {r6}
pop {r5}
pop {r4}
BX lr
endp
-
-
-
-
END
\ No newline at end of file
diff --git a/soft/PjtKEIL_StepSon/StepSon.uvoptx b/soft/PjtKEIL_StepSon/StepSon.uvoptx
index da50abb..fb2a3ed 100644
--- a/soft/PjtKEIL_StepSon/StepSon.uvoptx
+++ b/soft/PjtKEIL_StepSon/StepSon.uvoptx
@@ -175,6 +175,21 @@
1
r0,0x0A
+
+ 4
+ 1
+ SortieSon
+
+
+ 5
+ 1
+ r8,0x0A
+
+
+ 6
+ 1
+ r6,0x0A
+
@@ -230,12 +245,12 @@
0
`SortieSon
- 0080000000000000000000000000000000408F4000000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000001000000000000000000E03F1900000000000000000000000000000000000000540A0008
+ 0080000000000000000000000000000000408F4000000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000001000000000000000000E03F1600000000000000000000000000000000000000540A0008
1
((portb & 0x00000001) & 0x1) >> 0
- 0080000000000000000000000000000000408F400000000000000000000000000000000028706F72746220262030783030303030303031290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000002000000000000000000E03F1900000000000000000000000000000000000000B40A0008
+ 0080000000000000000000000000000000408F400000000000000000000000000000000028706F72746220262030783030303030303031290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000002000000000000000000E03F1600000000000000000000000000000000000000B40A0008
@@ -381,6 +396,13 @@
+
+
+ 0
+ 1
+ SortieSon
+
+
1
@@ -409,7 +431,7 @@
0
0
0
- 0
+ 1
0
0
0