simplifie?
This commit is contained in:
parent
87f270494f
commit
bdd227f948
1 changed files with 8 additions and 14 deletions
|
@ -1,17 +1,11 @@
|
|||
globals (res)
|
||||
local compteur:
|
||||
compteur <- copy 5;
|
||||
res <- copy 1;
|
||||
res <- mul res, 5;
|
||||
res <- mul res, 4;
|
||||
res <- mul res, 3;
|
||||
res <- mul res, 2;
|
||||
res <- mul res, 1;
|
||||
|
||||
condition:
|
||||
jumpif lte compteur, 1 -> fin, boucle;
|
||||
|
||||
boucle:
|
||||
res <- mul res, compteur;
|
||||
compteur <- sub compteur, 1;
|
||||
jump condition;
|
||||
|
||||
fin:
|
||||
%rdi <- copy res;
|
||||
print_int();
|
||||
end
|
||||
|
|
Reference in a new issue