diff options
-rwxr-xr-x | subx/apps/factorial | bin | 455 -> 476 bytes | |||
-rw-r--r-- | subx/apps/factorial.subx | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/subx/apps/factorial b/subx/apps/factorial index 1d61ad03..e5c76c6e 100755 --- a/subx/apps/factorial +++ b/subx/apps/factorial Binary files differdiff --git a/subx/apps/factorial.subx b/subx/apps/factorial.subx index 36bc90f8..88f4baa8 100644 --- a/subx/apps/factorial.subx +++ b/subx/apps/factorial.subx @@ -131,6 +131,13 @@ $check_ints_equal:else: e8/call write_stderr/disp32 # discard arg 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add 4 to ESP + # print newline + # push args + 68/push Newline/imm32 + # call + e8/call write_stderr/disp32 + # discard arg + 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add 4 to ESP # end c3/return @@ -196,6 +203,12 @@ write_stderr: # s : (address array byte) -> <void> c3/return == data +Newline: + # size + 01 00 00 00 + # data + 0a/newline + Test_argv: # null-terminated # data 74/t 65/e 73/s 74/t 00/null |