From ff167ad77a615ef0506dce1e21c973533ca83088 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 11 May 2019 10:47:34 -0700 Subject: 5154 Bugfix: I'd neglected to update the input stream's state when natively writing a stream to file. --- subx/062write-stream.subx | 2 ++ subx/apps/assort | Bin 21697 -> 21700 bytes subx/apps/crenshaw2-1 | Bin 18856 -> 18859 bytes subx/apps/crenshaw2-1b | Bin 19415 -> 19418 bytes subx/apps/factorial | Bin 17772 -> 17775 bytes subx/apps/handle | Bin 18599 -> 18602 bytes subx/apps/hex | Bin 21865 -> 21868 bytes subx/apps/pack | Bin 36457 -> 36460 bytes 8 files changed, 2 insertions(+) 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) -> # . . 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 Binary files a/subx/apps/assort and b/subx/apps/assort differ diff --git a/subx/apps/crenshaw2-1 b/subx/apps/crenshaw2-1 index e518ef8e..d8c36cab 100755 Binary files a/subx/apps/crenshaw2-1 and b/subx/apps/crenshaw2-1 differ diff --git a/subx/apps/crenshaw2-1b b/subx/apps/crenshaw2-1b index 2dcc5d83..66bd4fa8 100755 Binary files a/subx/apps/crenshaw2-1b and b/subx/apps/crenshaw2-1b differ diff --git a/subx/apps/factorial b/subx/apps/factorial index 53e643dd..0db812db 100755 Binary files a/subx/apps/factorial and b/subx/apps/factorial differ diff --git a/subx/apps/handle b/subx/apps/handle index 26819ce5..7869c416 100755 Binary files a/subx/apps/handle and b/subx/apps/handle differ diff --git a/subx/apps/hex b/subx/apps/hex index 423b3342..a07214ea 100755 Binary files a/subx/apps/hex and b/subx/apps/hex differ diff --git a/subx/apps/pack b/subx/apps/pack index 111cc8d5..30bacf4d 100755 Binary files a/subx/apps/pack and b/subx/apps/pack differ -- cgit 1.4.1-2-gfad0