diff options
Diffstat (limited to 'apps/factorial.subx')
-rw-r--r-- | apps/factorial.subx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/factorial.subx b/apps/factorial.subx index 1fb111d0..23cb8294 100644 --- a/apps/factorial.subx +++ b/apps/factorial.subx @@ -50,11 +50,12 @@ Entry: # run tests if necessary, compute `factorial(5)` if not 74/jump-if-equal $run-main/disp8 # run-tests() e8/call run-tests/disp32 - # return *Num-test-failures + # syscall(exit, *Num-test-failures) 8b/copy 0/mod/indirect 5/rm32/.disp32 . . 3/r32/ebx Num-test-failures/disp32 # copy *Num-test-failures to ebx eb/jump $main:end/disp8 $run-main: # - otherwise return factorial(5) + # eax = factorial(5) # . . push args 68/push 5/imm32 # . . call |