diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-12-08 13:56:46 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-12-08 23:31:05 -0800 |
commit | 2a2a5b1e43b6aa650a41ab1ec68d9778c14cb649 (patch) | |
tree | 734619639755cf5b95490bdc4362bbef0a504881 /066print-int.subx | |
parent | a93cd189c95fc82a8f1db4e42e5f278bc642bb0c (diff) | |
download | mu-2a2a5b1e43b6aa650a41ab1ec68d9778c14cb649.tar.gz |
5804
Try to make the comments consistent with the type system we'll eventually have.
Diffstat (limited to '066print-int.subx')
-rw-r--r-- | 066print-int.subx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/066print-int.subx b/066print-int.subx index cf043635..a1f968f7 100644 --- a/066print-int.subx +++ b/066print-int.subx @@ -5,7 +5,8 @@ # . op subop mod rm32 base index scale r32 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes -to-hex-char: # in/eax : nibble -> out/eax : byte +# convert the lowest nibble of eax to ascii and return it in the lowest byte of eax +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 @@ -17,7 +18,7 @@ $to-hex-char:else: 05/add-to-eax 0x57/imm32/a-10 c3/return -append-byte-hex: # f : (address stream), n : int +append-byte-hex: # f : (address stream byte), n : int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -174,7 +175,7 @@ test-print-byte-buffered: # . end c3/return -print-int32: # f : (address stream), n : int +print-int32: # f : (address stream byte), n : int # pseudocode: # write(f, "0x") # ecx = 28 |