about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--subx/065write-buffered.subx (renamed from subx/066write-buffered.subx)0
-rw-r--r--subx/066print-int.subx (renamed from subx/067print-int.subx)12
-rw-r--r--subx/067parse-hex.subx (renamed from subx/065hex.subx)14
-rwxr-xr-xsubx/apps/assortbin34167 -> 34167 bytes
-rwxr-xr-xsubx/apps/crenshaw2-1bin24575 -> 24575 bytes
-rwxr-xr-xsubx/apps/crenshaw2-1bbin25134 -> 25134 bytes
-rwxr-xr-xsubx/apps/dquotesbin40723 -> 40723 bytes
-rwxr-xr-xsubx/apps/factorialbin23491 -> 23491 bytes
-rwxr-xr-xsubx/apps/handlebin24350 -> 24350 bytes
-rwxr-xr-xsubx/apps/hexbin27584 -> 27584 bytes
-rwxr-xr-xsubx/apps/packbin46819 -> 46819 bytes
-rwxr-xr-xsubx/apps/surveybin42817 -> 42817 bytes
-rwxr-xr-xsubx/apps/testsbin32979 -> 32979 bytes
13 files changed, 13 insertions, 13 deletions
diff --git a/subx/066write-buffered.subx b/subx/065write-buffered.subx
index 35f75199..35f75199 100644
--- a/subx/066write-buffered.subx
+++ b/subx/065write-buffered.subx
diff --git a/subx/067print-int.subx b/subx/066print-int.subx
index c9b8d2e4..c5968837 100644
--- a/subx/067print-int.subx
+++ b/subx/066print-int.subx
@@ -5,6 +5,18 @@
 # . 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
+    # 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
+    05/add-to-EAX  0x30/imm32/0
+    c3/return
+$to-hex-char:else:
+    # otherwise return EAX + 'a' - 10
+    05/add-to-EAX  0x57/imm32/a-10
+    c3/return
+
 append-byte-hex:  # f : (address stream), n : int -> <void>
     # . prolog
     55/push-EBP
diff --git a/subx/065hex.subx b/subx/067parse-hex.subx
index d188d4d3..bbfc4ec9 100644
--- a/subx/065hex.subx
+++ b/subx/067parse-hex.subx
@@ -1,4 +1,4 @@
-# some utilities for converting numbers to/from hex
+# some utilities for converting numbers from hex
 # lowercase letters only for now
 
 == code
@@ -806,16 +806,4 @@ $from-hex-char:else:
     2d/subtract-from-EAX  0x57/imm32/a-10
     c3/return
 
-to-hex-char:  # in/EAX : nibble -> out/EAX : byte
-    # 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
-    05/add-to-EAX  0x30/imm32/0
-    c3/return
-$to-hex-char:else:
-    # otherwise return EAX + 'a' - 10
-    05/add-to-EAX  0x57/imm32/a-10
-    c3/return
-
 # . . vim:nowrap:textwidth=0
diff --git a/subx/apps/assort b/subx/apps/assort
index 8a109450..d096be37 100755
--- a/subx/apps/assort
+++ b/subx/apps/assort
Binary files differdiff --git a/subx/apps/crenshaw2-1 b/subx/apps/crenshaw2-1
index e28504b5..db50d1cf 100755
--- a/subx/apps/crenshaw2-1
+++ b/subx/apps/crenshaw2-1
Binary files differdiff --git a/subx/apps/crenshaw2-1b b/subx/apps/crenshaw2-1b
index 8db1600f..4e05331b 100755
--- a/subx/apps/crenshaw2-1b
+++ b/subx/apps/crenshaw2-1b
Binary files differdiff --git a/subx/apps/dquotes b/subx/apps/dquotes
index 8567ba31..49ca7a1a 100755
--- a/subx/apps/dquotes
+++ b/subx/apps/dquotes
Binary files differdiff --git a/subx/apps/factorial b/subx/apps/factorial
index cdf8e50f..820890e5 100755
--- a/subx/apps/factorial
+++ b/subx/apps/factorial
Binary files differdiff --git a/subx/apps/handle b/subx/apps/handle
index a03f4c70..1ba82034 100755
--- a/subx/apps/handle
+++ b/subx/apps/handle
Binary files differdiff --git a/subx/apps/hex b/subx/apps/hex
index 50c168a3..230e3f2d 100755
--- a/subx/apps/hex
+++ b/subx/apps/hex
Binary files differdiff --git a/subx/apps/pack b/subx/apps/pack
index 5c2aba74..757378f9 100755
--- a/subx/apps/pack
+++ b/subx/apps/pack
Binary files differdiff --git a/subx/apps/survey b/subx/apps/survey
index b48862c8..4d30e651 100755
--- a/subx/apps/survey
+++ b/subx/apps/survey
Binary files differdiff --git a/subx/apps/tests b/subx/apps/tests
index 47d45649..58ece991 100755
--- a/subx/apps/tests
+++ b/subx/apps/tests
Binary files differ