diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-01-27 00:36:44 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-01-27 00:36:44 -0800 |
commit | 71eb22a5bf94f5fa0a3c95212450e3c6a1a6a990 (patch) | |
tree | 56307b5145be44b2239d3c782234309ed714f1b6 /apps/factorial2.subx | |
parent | 1a65c3af0f797892f5981f8ebd33c275c1ef06b0 (diff) | |
download | mu-71eb22a5bf94f5fa0a3c95212450e3c6a1a6a990.tar.gz |
5924
Diffstat (limited to 'apps/factorial2.subx')
-rw-r--r-- | apps/factorial2.subx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/factorial2.subx b/apps/factorial2.subx index 7e0a737d..7c76cc9a 100644 --- a/apps/factorial2.subx +++ b/apps/factorial2.subx @@ -68,7 +68,7 @@ $main:end: b8/copy-to-eax 1/imm32/exit cd/syscall 0x80/imm8 -factorial: # n : int -> int/eax +factorial: # n: int -> int/eax # . prologue 55/push-ebp 89/<- %ebp 4/r32/esp @@ -77,10 +77,10 @@ factorial: # n : int -> int/eax b8/copy-to-eax 1/imm32 81 7/subop/compare *(ebp+8) 1/imm32 7e/jump-if-<= $factorial:end/disp8 - # var ebx : int = n-1 + # var ebx: int = n-1 8b/-> *(ebp+8) 3/r32/ebx 4b/decrement-ebx - # var eax : int = factorial(n-1) + # var eax: int = factorial(n-1) # . . push args 53/push-ebx # . . call |