diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-01-10 17:13:47 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-01-10 17:13:47 -0800 |
commit | 89bcb56717c86af44ce64f6e432d79836ae23a96 (patch) | |
tree | 76a98b5a9c716845d585965e98991833e9ce8003 /subx | |
parent | 5a2e541c181d6ef75c31b98084f5c23551aa6d3a (diff) | |
download | mu-89bcb56717c86af44ce64f6e432d79836ae23a96.tar.gz |
4918
Diffstat (limited to 'subx')
-rw-r--r-- | subx/059read-byte.subx | 2 | ||||
-rw-r--r-- | subx/062write-byte.subx | 2 | ||||
-rw-r--r-- | subx/064write-buffered.subx | 2 | ||||
-rw-r--r-- | subx/068read-line.subx | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/subx/059read-byte.subx b/subx/059read-byte.subx index fc583809..c62b035e 100644 --- a/subx/059read-byte.subx +++ b/subx/059read-byte.subx @@ -64,7 +64,7 @@ read-byte: # f : (address buffered-file) -> byte-or-eof/EAX e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP - # . f->read must now be 0; update ECX + # . f->read must now be 0; update its cache at ECX 31/xor 3/mod/direct 1/rm32/ECX . . . 1/r32/ECX . . # clear ECX # . EAX = read(f->fd, stream = f+4) # . . push args diff --git a/subx/062write-byte.subx b/subx/062write-byte.subx index 30e2b425..9c9b50a6 100644 --- a/subx/062write-byte.subx +++ b/subx/062write-byte.subx @@ -64,7 +64,7 @@ write-byte: # f : (address buffered-file), n : int -> <void> e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP - # . clear ECX (cached f->write) + # . f->write must now be 0; update its cache at ECX 31/xor 3/mod/direct 1/rm32/ECX . . . 1/r32/ECX . . # clear ECX $write-byte:to-stream: # write to stream diff --git a/subx/064write-buffered.subx b/subx/064write-buffered.subx index 3c3c7276..9ae08b21 100644 --- a/subx/064write-buffered.subx +++ b/subx/064write-buffered.subx @@ -81,7 +81,7 @@ $write-buffered:loop: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP - # . clear EBX (cached f->write) + # . f->write must now be 0; update its cache at EBX 31/xor 3/mod/direct 3/rm32/EBX . . . 3/r32/EBX . . # clear EBX $write-buffered:to-stream: # write to stream diff --git a/subx/068read-line.subx b/subx/068read-line.subx index b73958f5..961fc521 100644 --- a/subx/068read-line.subx +++ b/subx/068read-line.subx @@ -55,7 +55,7 @@ $read-line:loop: e8/call clear-stream/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP - # . f->read must now be 0; update ECX + # . f->read must now be 0; update its cache at ECX 31/xor 3/mod/direct 1/rm32/ECX . . . 1/r32/ECX . . # clear ECX # . EAX = read(f->fd, stream = f+4) # . . push args |