diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-10-05 21:54:08 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-10-05 21:54:08 -0700 |
commit | c9d21799d69b53946c445dd769e5f1afa5409e67 (patch) | |
tree | 637cfc4ae891736d2392d4dbfcb7872c147f4ed0 /subx | |
parent | de21899cb2560ca7788539304051aae380a40959 (diff) | |
download | mu-c9d21799d69b53946c445dd769e5f1afa5409e67.tar.gz |
4670
Diffstat (limited to 'subx')
-rw-r--r-- | subx/apps/factorial.subx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/subx/apps/factorial.subx b/subx/apps/factorial.subx index fa0d58b2..8eac94bc 100644 --- a/subx/apps/factorial.subx +++ b/subx/apps/factorial.subx @@ -64,7 +64,7 @@ factorial: # if (n <= 1) jump exit 81 7/subop/compare 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none . . 8/disp8 1/imm32 # compare *(EBP+8) 7e/jump-if-<= $factorial:exit/disp8 - # EBX: n-1 + # EBX = n-1 8b/copy 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none 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 # EAX = factorial(n-1) |