We can assign labels with {{fname|label(my_label)}}, and branch to them using {{fname|b(my_label)}}, or a conditional branch like {{fname|bgt(my_label)}}.
+
Nous pouvons assigner un libellé (''label'' en anglais) a l'aide de {{fname|label(mon_label)}}, et faire sauter l'exécution du code vers l'étiquette (''to branch'' en anglais) en utilisant {{fname|b(mon_label)}}, ou un branchement conditionnel tel que {{fname|bgt(mon_label)}}.
−
The following example flashes the green LED. It flashes it {{fname|r0}} times.
+
L'example de code suivant fait clignoter la LED vertes. La LED clignotera {{fname|r0}} fois.
<nowiki>@micropython.asm_thumb
<nowiki>@micropython.asm_thumb
def flash_led(r0):
def flash_led(r0):
−
# get the GPIOA address in r1
+
# placer l'adresse GPIOA dans r1
movwt(r1, stm.GPIOA)
movwt(r1, stm.GPIOA)
−
# get the bit mask for PA14 (the pin LED #2 is on)
+
# obtenir un masque de bits pour PA14 (broche de la LED #2)