diff options
-rw-r--r-- | subx/055trace.subx | 2 | ||||
-rwxr-xr-x | subx/apps/crenshaw2-1 | bin | 2522 -> 2529 bytes | |||
-rwxr-xr-x | subx/apps/factorial | bin | 2520 -> 2533 bytes | |||
-rw-r--r-- | subx/apps/factorial.subx | 5 | ||||
-rwxr-xr-x | subx/test_apps | 8 |
5 files changed, 11 insertions, 4 deletions
diff --git a/subx/055trace.subx b/subx/055trace.subx index 237fbed9..68309ab0 100644 --- a/subx/055trace.subx +++ b/subx/055trace.subx @@ -219,7 +219,7 @@ test-trace-single: 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP # check-ints-equal(*Test-trace-stream.data, 41/A 62/b 0a/newline 00, msg) # push args - 68/push "F - test-trace"/imm32 + 68/push "F - test-trace-single"/imm32 68/push 0x0a6241/imm32/Ab-newline # push *Test-trace-stream.data b8/copy-to-EAX Test-trace-stream/imm32 diff --git a/subx/apps/crenshaw2-1 b/subx/apps/crenshaw2-1 index f551dbf9..40c1e72d 100755 --- a/subx/apps/crenshaw2-1 +++ b/subx/apps/crenshaw2-1 Binary files differdiff --git a/subx/apps/factorial b/subx/apps/factorial index 5b7811bc..ad2c98a4 100755 --- a/subx/apps/factorial +++ b/subx/apps/factorial Binary files differdiff --git a/subx/apps/factorial.subx b/subx/apps/factorial.subx index 8eac94bc..578aeb70 100644 --- a/subx/apps/factorial.subx +++ b/subx/apps/factorial.subx @@ -36,9 +36,10 @@ # check result 3d/compare-EAX 1/imm32 75/jump-if-not-equal $run-main/disp8 - # then + # then return run-tests() e8/call run-tests/disp32 - eb/jump $main-exit/disp8 + 8b/copy 0/mod/indirect 5/rm32/.disp32 . . 0/r32/EAX Num-test-failures/disp32 # copy *Num-test-failures to EAX + eb/jump $main-exit/disp8 # where EAX will get copied to EBX # else EAX = factorial(5) $run-main: # push arg diff --git a/subx/test_apps b/subx/test_apps index 8f00e538..a8060016 100755 --- a/subx/test_apps +++ b/subx/test_apps @@ -115,7 +115,11 @@ echo ex11 CFLAGS=-g ./subx translate examples/ex11.subx -o examples/ex11 test `uname -m` = 'i686' && git diff --quiet examples/ex11 CFLAGS=-g ./subx run examples/ex11 -test `uname` = 'Linux' && examples/ex11 +echo +test `uname` = 'Linux' && { + examples/ex11 + echo +} echo ex12 CFLAGS=-g ./subx translate examples/ex12.subx -o examples/ex12 @@ -129,10 +133,12 @@ test `uname -m` = 'i686' && git diff --quiet apps/factorial CFLAGS=-g ./subx run apps/factorial || ret=$? test $ret -eq 120 # factorial(5) CFLAGS=-g ./subx run apps/factorial test +echo test `uname` = 'Linux' && { apps/factorial || ret=$? test $ret -eq 120 # factorial(5) apps/factorial test + echo } echo crenshaw2-1 |