diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-10-03 00:15:08 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-10-03 00:15:08 -0700 |
commit | 3c1bc4fcb4f7be0f668b6e41f804adac15f6662e (patch) | |
tree | ccc68347468533269f3de7f67db4ab4b8861708f /apps | |
parent | 60a02b9e850c274eb58fe806305d84bbbeed206c (diff) | |
download | mu-3c1bc4fcb4f7be0f668b6e41f804adac15f6662e.tar.gz |
5696
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/factorial | bin | 41376 -> 41371 bytes | |||
-rw-r--r-- | apps/factorial.subx | 2 |
2 files changed, 1 insertions, 1 deletions
diff --git a/apps/factorial b/apps/factorial index e3e02af5..f23fdd0f 100755 --- a/apps/factorial +++ b/apps/factorial Binary files differdiff --git a/apps/factorial.subx b/apps/factorial.subx index ef2262ec..66fc4be0 100644 --- a/apps/factorial.subx +++ b/apps/factorial.subx @@ -79,7 +79,7 @@ factorial: # n : int -> int/eax 7e/jump-if-<= $factorial:end/disp8 # ebx = n-1 8b/copy 1/mod/*+disp8 5/rm32/ebp . . 3/r32/ebx 8/disp8 . # copy *(ebp+8) to ebx - 81 5/subop/subtract 3/mod/direct 3/rm32/ebx . . . . . 1/imm32 # subtract from ebx + 4b/decrement-ebx # eax = factorial(n-1) # . . push args 53/push-ebx |