about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
Diffstat (limited to 'subx')
-rwxr-xr-xsubx/apps/assortbin34142 -> 34142 bytes
-rw-r--r--subx/apps/assort.subx46
-rwxr-xr-xsubx/apps/dquotesbin40495 -> 40495 bytes
-rw-r--r--subx/apps/dquotes.subx6
-rwxr-xr-xsubx/apps/surveybin42791 -> 42791 bytes
-rw-r--r--subx/apps/survey.subx12
6 files changed, 52 insertions, 12 deletions
diff --git a/subx/apps/assort b/subx/apps/assort
index b8cfbe5c..e9eb52ab 100755
--- a/subx/apps/assort
+++ b/subx/apps/assort
Binary files differdiff --git a/subx/apps/assort.subx b/subx/apps/assort.subx
index a71270c5..d2418ce3 100644
--- a/subx/apps/assort.subx
+++ b/subx/apps/assort.subx
@@ -25,10 +25,10 @@
 
 Entry:
     # initialize heap
-    # . Heap = new-segment(64KB)
+    # . Heap = new-segment(1MB)
     # . . push args
     68/push  Heap/imm32
-    68/push  0x10000/imm32/64KB
+    68/push  0x100000/imm32/1MB
     # . . call
     e8/call  new-segment/disp32
     # . . discard args
@@ -525,6 +525,13 @@ $read-segments:check0:
 #?     e8/call  write-stream/disp32
 #?     # . . discard args
 #?     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+#?     # . rewind-stream(line)
+#?     # . . push args
+#?     51/push-ECX
+#?     # . . call
+#?     e8/call  rewind-stream/disp32
+#?     # . . discard args
+#?     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
 #?     # . write(2/stderr, "$\n")
 #?     # . . push args
 #?     68/push  "$\n"/imm32
@@ -703,6 +710,39 @@ $read-segments:check-for-segment-header:
     89/copy                         0/mod/indirect  0/rm32/EAX    .           .             .           3/r32/EBX   .               .                 # copy EBX to *EAX
     # fall through
 $read-segments:regular-line:
+#?     # dump line {{{
+#?     # . write(2/stderr, "regular line: ")
+#?     # . . push args
+#?     68/push  "regular line: "/imm32
+#?     68/push  2/imm32/stderr
+#?     # . . call
+#?     e8/call  write/disp32
+#?     # . . discard args
+#?     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+#?     # . rewind-stream(line)
+#?     # . . push args
+#?     51/push-ECX
+#?     # . . call
+#?     e8/call  rewind-stream/disp32
+#?     # . . discard args
+#?     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
+#?     # . write-stream(2/stderr, line)
+#?     # . . push args
+#?     51/push-ECX
+#?     68/push  2/imm32/stderr
+#?     # . . call
+#?     e8/call  write-stream/disp32
+#?     # . . discard args
+#?     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+#?     # . write(2/stderr, "$\n")
+#?     # . . push args
+#?     68/push  "$\n"/imm32
+#?     68/push  2/imm32/stderr
+#?     # . . call
+#?     e8/call  write/disp32
+#?     # . . discard args
+#?     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
+#?     # }}}
     # rewind-stream(line)
     # . . push args
     51/push-ECX
@@ -799,6 +839,6 @@ $write-segments:end:
 == data
 
 Segment-size:
-  0x1000/imm32/4KB
+  0x8000/imm32/4KB
 
 # . . vim:nowrap:textwidth=0
diff --git a/subx/apps/dquotes b/subx/apps/dquotes
index 68dac8fc..de36ba12 100755
--- a/subx/apps/dquotes
+++ b/subx/apps/dquotes
Binary files differdiff --git a/subx/apps/dquotes.subx b/subx/apps/dquotes.subx
index 85a42f53..c108ade5 100644
--- a/subx/apps/dquotes.subx
+++ b/subx/apps/dquotes.subx
@@ -21,10 +21,10 @@
 
 Entry:
     # initialize heap
-    # . Heap = new-segment(64KB)
+    # . Heap = new-segment(1MB)
     # . . push args
     68/push  Heap/imm32
-    68/push  0x10000/imm32/64KB
+    68/push  0x100000/imm32/1MB
     # . . call
     e8/call  new-segment/disp32
     # . . discard args
@@ -2639,7 +2639,7 @@ test-string-length-at-start-of-slice-escaped:
 == data
 
 Segment-size:
-  0x1000/imm32/4KB
+  0x8000/imm32/32KB
 
 Next-string-literal:  # tracks the next auto-generated variable name
   1/imm32
diff --git a/subx/apps/survey b/subx/apps/survey
index b7bd7dd3..4b258446 100755
--- a/subx/apps/survey
+++ b/subx/apps/survey
Binary files differdiff --git a/subx/apps/survey.subx b/subx/apps/survey.subx
index 79fddc53..9717944d 100644
--- a/subx/apps/survey.subx
+++ b/subx/apps/survey.subx
@@ -42,10 +42,10 @@
 # . 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
 
 Entry:
-    # Heap = new-segment(64KB)
+    # Heap = new-segment(1MB)
     # . . push args
     68/push  Heap/imm32
-    68/push  0x10000/imm32/64KB
+    68/push  0x100000/imm32/1MB
     # . . call
     e8/call  new-segment/disp32
     # . . discard args
@@ -142,9 +142,9 @@ convert:  # infile : (address buffered-file), out : (address buffered-file) -> <
     68/push  0/imm32/read
     68/push  0/imm32/write
     89/copy                         3/mod/direct    2/rm32/EDX    .           .             .           4/r32/ESP   .               .                 # copy ESP to EDX
-    # var in/ESI = stream(4096 * 1)
-    81          5/subop/subtract    3/mod/direct    4/rm32/ESP    .           .             .           .           .               0x1000/imm32      # subtract from ESP
-    68/push  0x1000/imm32/length
+    # var in/ESI = stream(16384 * 1)
+    81          5/subop/subtract    3/mod/direct    4/rm32/ESP    .           .             .           .           .               0x4000/imm32      # subtract from ESP
+    68/push  0x4000/imm32/length
     68/push  0/imm32/read
     68/push  0/imm32/write
     89/copy                         3/mod/direct    6/rm32/ESI    .           .             .           4/r32/ESP   .               .                 # copy ESP to ESI
@@ -4504,7 +4504,7 @@ test-num-bytes-handles-imm32:
 == data
 
 Segment-size:
-  0x1000/imm32/4KB
+  0x8000/imm32/4KB
 
 # This block of bytes gets copied to the start of the output ELF file, with
 # some fields filled in.