about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-05-11 10:47:34 -0700
committerKartik Agaram <vc@akkartik.com>2019-05-11 10:47:34 -0700
commitff167ad77a615ef0506dce1e21c973533ca83088 (patch)
tree4c84f3979f4e5008ad00188356a93ca202b81ff2 /subx
parent258f6b3a3a51f62851731cdb391b65667cde2993 (diff)
downloadmu-ff167ad77a615ef0506dce1e21c973533ca83088.tar.gz
5154
Bugfix: I'd neglected to update the input stream's state when natively
writing a stream to file.
Diffstat (limited to 'subx')
-rw-r--r--subx/062write-stream.subx2
-rwxr-xr-xsubx/apps/assortbin21697 -> 21700 bytes
-rwxr-xr-xsubx/apps/crenshaw2-1bin18856 -> 18859 bytes
-rwxr-xr-xsubx/apps/crenshaw2-1bbin19415 -> 19418 bytes
-rwxr-xr-xsubx/apps/factorialbin17772 -> 17775 bytes
-rwxr-xr-xsubx/apps/handlebin18599 -> 18602 bytes
-rwxr-xr-xsubx/apps/hexbin21865 -> 21868 bytes
-rwxr-xr-xsubx/apps/packbin36457 -> 36460 bytes
8 files changed, 2 insertions, 0 deletions
diff --git a/subx/062write-stream.subx b/subx/062write-stream.subx
index 73766fe3..eb2df0c5 100644
--- a/subx/062write-stream.subx
+++ b/subx/062write-stream.subx
@@ -102,6 +102,8 @@ _write-stream:  # fd : int, s : (address stream) -> <void>
     # . . syscall
     b8/copy-to-EAX  4/imm32/write
     cd/syscall  0x80/imm8
+    # s->read += EAX
+    01/add                          1/mod/*+disp8   6/rm32/ESI    .           .             .           0/r32/EAX   4/disp8         .                 # add EAX to *(ESI+4)
     # . restore registers
     5f/pop-to-EDI
     5e/pop-to-ESI
diff --git a/subx/apps/assort b/subx/apps/assort
index e36590ee..af7b47c2 100755
--- a/subx/apps/assort
+++ b/subx/apps/assort
Binary files differdiff --git a/subx/apps/crenshaw2-1 b/subx/apps/crenshaw2-1
index e518ef8e..d8c36cab 100755
--- a/subx/apps/crenshaw2-1
+++ b/subx/apps/crenshaw2-1
Binary files differdiff --git a/subx/apps/crenshaw2-1b b/subx/apps/crenshaw2-1b
index 2dcc5d83..66bd4fa8 100755
--- a/subx/apps/crenshaw2-1b
+++ b/subx/apps/crenshaw2-1b
Binary files differdiff --git a/subx/apps/factorial b/subx/apps/factorial
index 53e643dd..0db812db 100755
--- a/subx/apps/factorial
+++ b/subx/apps/factorial
Binary files differdiff --git a/subx/apps/handle b/subx/apps/handle
index 26819ce5..7869c416 100755
--- a/subx/apps/handle
+++ b/subx/apps/handle
Binary files differdiff --git a/subx/apps/hex b/subx/apps/hex
index 423b3342..a07214ea 100755
--- a/subx/apps/hex
+++ b/subx/apps/hex
Binary files differdiff --git a/subx/apps/pack b/subx/apps/pack
index 111cc8d5..30bacf4d 100755
--- a/subx/apps/pack
+++ b/subx/apps/pack
Binary files differ