about summary refs log tree commit diff stats
path: root/subx/066print-byte.subx
diff options
context:
space:
mode:
Diffstat (limited to 'subx/066print-byte.subx')
-rw-r--r--subx/066print-byte.subx22
1 files changed, 11 insertions, 11 deletions
diff --git a/subx/066print-byte.subx b/subx/066print-byte.subx
index 39d7793e..b8b1dd24 100644
--- a/subx/066print-byte.subx
+++ b/subx/066print-byte.subx
@@ -5,7 +5,7 @@
 # . 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
 
-print-byte:  # f : (address buffered-file), n : int -> <void>
+print-byte-buffered:  # f : (address buffered-file), n : int -> <void>
     # . prolog
     55/push-EBP
     89/copy                         3/mod/direct    5/rm32/EBP    .           .             .           4/r32/ESP   .               .                 # copy ESP to EBP
@@ -17,12 +17,12 @@ print-byte:  # f : (address buffered-file), n : int -> <void>
     25/and-EAX  0xf/imm32
     # . AL = to-hex-char(AL)
     e8/call  to-hex-char/disp32
-    # write-byte(f, AL)
+    # write-byte-buffered(f, AL)
     # . . push args
     50/push-EAX
     ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           8/disp8         .                 # push *(EBP+8)
     # . . call
-    e8/call  write-byte/disp32
+    e8/call  write-byte-buffered/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # AL = convert lower nibble to hex
@@ -30,15 +30,15 @@ print-byte:  # f : (address buffered-file), n : int -> <void>
     25/and-EAX  0xf/imm32
     # . AL = to-hex-char(AL)
     e8/call  to-hex-char/disp32
-    # write-byte(f, AL)
+    # write-byte-buffered(f, AL)
     # . . push args
     50/push-EAX
     ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           8/disp8         .                 # push *(EBP+8)
     # . . call
-    e8/call  write-byte/disp32
+    e8/call  write-byte-buffered/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
-$print-byte:end:
+$print-byte-buffered:end:
     # . restore registers
     58/pop-to-EAX
     # . epilog
@@ -46,8 +46,8 @@ $print-byte:end:
     5d/pop-to-EBP
     c3/return
 
-test-print-byte:
-    # - check that print-byte prints the hex textual representation
+test-print-byte-buffered:
+    # - check that print-byte-buffered prints the hex textual representation
     # setup
     # . clear-stream(_test-stream)
     # . . push args
@@ -65,12 +65,12 @@ test-print-byte:
     e8/call  clear-stream/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
-    # print-byte(_test-buffered-file, 0xa)  # exercises digit, non-digit as well as leading zero
+    # print-byte-buffered(_test-buffered-file, 0xa)  # exercises digit, non-digit as well as leading zero
     # . . push args
     68/push  0xa/imm32
     68/push  _test-buffered-file/imm32
     # . . call
-    e8/call  print-byte/disp32
+    e8/call  print-byte-buffered/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
     # flush(_test-buffered-file)
@@ -82,7 +82,7 @@ test-print-byte:
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
     # check-stream-equal(_test-stream, "0a", msg)
     # . . push args
-    68/push  "F - test-print-byte"/imm32
+    68/push  "F - test-print-byte-buffered"/imm32
     68/push  "0a"/imm32
     68/push  _test-stream/imm32
     # . . call