[SPCA] more assembly

This commit is contained in:
RobinB27
2026-01-11 16:52:34 +01:00
parent f0c472bb87
commit 42b7451241
6 changed files with 50 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
factorial:
movl $1, %eax # Setup
.AGAIN:
imull %edi, %eax # %eax *= %edi
subl $1, %edi # %edi--
cmpl $1, %edi # 1 < %edi ?
jg .AGAIN # go back, if yes
ret