diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-01-27 00:36:44 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-01-27 00:36:44 -0800 |
commit | 71eb22a5bf94f5fa0a3c95212450e3c6a1a6a990 (patch) | |
tree | 56307b5145be44b2239d3c782234309ed714f1b6 /066print-int.subx | |
parent | 1a65c3af0f797892f5981f8ebd33c275c1ef06b0 (diff) | |
download | mu-71eb22a5bf94f5fa0a3c95212450e3c6a1a6a990.tar.gz |
5924
Diffstat (limited to '066print-int.subx')
-rw-r--r-- | 066print-int.subx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/066print-int.subx b/066print-int.subx index 91518dbe..cc604ce8 100644 --- a/066print-int.subx +++ b/066print-int.subx @@ -6,7 +6,7 @@ # . 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 # 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 +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 @@ -18,7 +18,7 @@ $to-hex-char:else: 05/add-to-eax 0x57/imm32/a-10 c3/return -append-byte-hex: # f : (addr stream byte), n : int +append-byte-hex: # f: (addr stream byte), n: int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -90,7 +90,7 @@ test-append-byte-hex: c3/return # print the hex representation for the lowest byte of a number -print-byte-buffered: # f : (addr buffered-file), n : int +print-byte-buffered: # f: (addr buffered-file), n: int # . prologue 55/push-ebp 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -175,7 +175,7 @@ test-print-byte-buffered: # . end c3/return -print-int32: # f : (addr stream byte), n : int +print-int32: # f: (addr stream byte), n: int # pseudocode: # write(f, "0x") # ecx = 28 @@ -263,7 +263,7 @@ test-print-int32: # . end c3/return -print-int32-buffered: # f : (addr buffered-file), n : int +print-int32-buffered: # f: (addr buffered-file), n: int # pseudocode: # write-buffered(f, "0x") # ecx = 28 |