diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-01-16 18:31:12 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-01-16 18:31:12 -0800 |
commit | 6070c23e5e1c60d3bb169e43bddfa59b1d322427 (patch) | |
tree | 9a70e378c33c15e4779cf94abda8f37c35a5d1da /061read-byte.subx | |
parent | 5a6601aba973ba1d1ef30b7b64438c25623b89c5 (diff) | |
download | mu-6070c23e5e1c60d3bb169e43bddfa59b1d322427.tar.gz |
5897 - rename comparison instructions
Signed and unsigned don't quite capture the essence of what the different combinations of x86 flags are doing for SubX. The crucial distinction is that one set of comparison operators is for integers and the second is for addresses.
Diffstat (limited to '061read-byte.subx')
-rw-r--r-- | 061read-byte.subx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/061read-byte.subx b/061read-byte.subx index 47fa209f..a2872d17 100644 --- a/061read-byte.subx +++ b/061read-byte.subx @@ -48,7 +48,7 @@ read-byte-buffered: # f : (addr buffered-file) -> byte-or-Eof/eax 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 8/disp8 . # copy *(esi+8) to ecx # if (f->read >= f->write) populate stream from file 3b/compare 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 . # compare ecx with *(esi+4) - 7c/jump-if-lesser $read-byte-buffered:from-stream/disp8 + 7c/jump-if-< $read-byte-buffered:from-stream/disp8 # . clear-stream(stream = f+4) # . . push args 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 0/r32/eax 4/disp8 . # copy esi+4 to eax @@ -69,7 +69,7 @@ read-byte-buffered: # f : (addr buffered-file) -> byte-or-Eof/eax 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp # if (eax == 0) return 0xffffffff 3d/compare-eax-and 0/imm32 - 75/jump-if-not-equal $read-byte-buffered:from-stream/disp8 + 75/jump-if-!= $read-byte-buffered:from-stream/disp8 b8/copy-to-eax 0xffffffff/imm32/Eof eb/jump $read-byte-buffered:end/disp8 $read-byte-buffered:from-stream: |