simplifie?

This commit is contained in:
Mylloon 2023-12-31 18:44:44 +01:00
parent 87f270494f
commit bdd227f948
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -1,17 +1,11 @@
globals (res) globals (res)
local compteur:
compteur <- copy 5;
res <- copy 1; 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; %rdi <- copy res;
print_int(); print_int();
end end