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 /066print-int.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 '066print-int.subx')
-rw-r--r-- | 066print-int.subx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/066print-int.subx b/066print-int.subx index dacf9ef5..91518dbe 100644 --- a/066print-int.subx +++ b/066print-int.subx @@ -10,7 +10,7 @@ to-hex-char: # in/eax : int -> out/eax : int # no error checking; accepts argument in eax # if (eax <= 9) return eax + '0' 3d/compare-eax-with 0x9/imm32/9 - 7f/jump-if-greater $to-hex-char:else/disp8 + 7f/jump-if-> $to-hex-char:else/disp8 05/add-to-eax 0x30/imm32/0 c3/return $to-hex-char:else: @@ -206,7 +206,7 @@ $print-int32:print-hex-prefix: $print-int32:loop: # if (ecx < 0) break 81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0/imm32 # compare ecx - 7c/jump-if-lesser $print-int32:end/disp8 + 7c/jump-if-< $print-int32:end/disp8 # eax = n >> ecx 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0xc/disp8 . # copy *(ebp+12) to eax d3/>>ecx 5/subop/pad-zeroes 3/mod/direct 0/rm32/eax . . . . . . # shift eax right by ecx bits, padding zeroes @@ -294,7 +294,7 @@ $print-int32-buffered:print-hex-prefix: $print-int32-buffered:loop: # if (ecx < 0) break 81 7/subop/compare 3/mod/direct 1/rm32/ecx . . . . . 0/imm32 # compare ecx - 7c/jump-if-lesser $print-int32-buffered:end/disp8 + 7c/jump-if-< $print-int32-buffered:end/disp8 # eax = n >> ecx 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0xc/disp8 . # copy *(ebp+12) to eax d3/>>ecx 5/subop/pad-zeroes 3/mod/direct 0/rm32/eax . . . . . . # shift eax right by ecx bits, padding zeroes |