about summary refs log tree commit diff stats
path: root/apps/factorial.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-10-03 00:15:08 -0700
committerKartik Agaram <vc@akkartik.com>2019-10-03 00:15:08 -0700
commit3c1bc4fcb4f7be0f668b6e41f804adac15f6662e (patch)
treeccc68347468533269f3de7f67db4ab4b8861708f /apps/factorial.subx
parent60a02b9e850c274eb58fe806305d84bbbeed206c (diff)
downloadmu-3c1bc4fcb4f7be0f668b6e41f804adac15f6662e.tar.gz
5696
Diffstat (limited to 'apps/factorial.subx')
-rw-r--r--apps/factorial.subx2
1 files changed, 1 insertions, 1 deletions
diff --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