about summary refs log tree commit diff stats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rwxr-xr-xapps/assortbin34384 -> 34424 bytes
-rwxr-xr-xapps/crenshaw2-1bin27378 -> 27418 bytes
-rwxr-xr-xapps/crenshaw2-1bbin27937 -> 27977 bytes
-rwxr-xr-xapps/desugarbin33629 -> 33687 bytes
-rw-r--r--apps/desugar.subx3
-rwxr-xr-xapps/dquotesbin40940 -> 40980 bytes
-rwxr-xr-xapps/factorialbin26294 -> 26334 bytes
-rwxr-xr-xapps/handlebin27148 -> 27188 bytes
-rwxr-xr-xapps/hexbin36939 -> 36979 bytes
-rwxr-xr-xapps/packbin47070 -> 47110 bytes
-rwxr-xr-xapps/surveybin43605 -> 43707 bytes
-rw-r--r--apps/survey.subx19
-rwxr-xr-xapps/testsbin33196 -> 33236 bytes
13 files changed, 13 insertions, 9 deletions
diff --git a/apps/assort b/apps/assort
index 70d7aaf3..65c376cb 100755
--- a/apps/assort
+++ b/apps/assort
Binary files differdiff --git a/apps/crenshaw2-1 b/apps/crenshaw2-1
index 9b0e0c58..46a69570 100755
--- a/apps/crenshaw2-1
+++ b/apps/crenshaw2-1
Binary files differdiff --git a/apps/crenshaw2-1b b/apps/crenshaw2-1b
index 34adc8ea..1ecdf77d 100755
--- a/apps/crenshaw2-1b
+++ b/apps/crenshaw2-1b
Binary files differdiff --git a/apps/desugar b/apps/desugar
index d04778dc..7e37ec11 100755
--- a/apps/desugar
+++ b/apps/desugar
Binary files differdiff --git a/apps/desugar.subx b/apps/desugar.subx
index 25c21d78..a982a5c6 100644
--- a/apps/desugar.subx
+++ b/apps/desugar.subx
@@ -227,13 +227,14 @@ desugar-register: # word : (address slice), out : (address buffered-file)
     50/push-EAX
     # reg-num/EAX = get-slice(Registers, word, row-size=8)
     # . . push args
+    68/push  "Registers"/imm32
     68/push  8/imm32/row-size
     ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           8/disp8         .                 # push *(EBP+8)
     68/push  Registers/imm32
     # . . call
     e8/call  get-slice/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0xc/imm32         # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0x10/imm32        # add to ESP
     # write-buffered(out, "3/mod/direct ")
     # . . push args
     68/push  "3/mod/direct "/imm32
diff --git a/apps/dquotes b/apps/dquotes
index b7a4adfe..bada9287 100755
--- a/apps/dquotes
+++ b/apps/dquotes
Binary files differdiff --git a/apps/factorial b/apps/factorial
index 8db732fa..ba94e958 100755
--- a/apps/factorial
+++ b/apps/factorial
Binary files differdiff --git a/apps/handle b/apps/handle
index ffaf43b4..6c590f36 100755
--- a/apps/handle
+++ b/apps/handle
Binary files differdiff --git a/apps/hex b/apps/hex
index 84575cfd..7d13505d 100755
--- a/apps/hex
+++ b/apps/hex
Binary files differdiff --git a/apps/pack b/apps/pack
index 720ba3ea..820f7962 100755
--- a/apps/pack
+++ b/apps/pack
Binary files differdiff --git a/apps/survey b/apps/survey
index 621efa5c..3431001b 100755
--- a/apps/survey
+++ b/apps/survey
Binary files differdiff --git a/apps/survey.subx b/apps/survey.subx
index 14f4eb55..4345b3ec 100644
--- a/apps/survey.subx
+++ b/apps/survey.subx
@@ -1435,7 +1435,7 @@ compute-addresses:  # segments : (address stream {string, segment-info}), labels
     #   while true
     #     if (lrow >= max) break
     #     seg-name : (address string) = lrow->segment-name
-    #     label-seg : (address segment-info) = get(segments, seg-name, row-size=16)
+    #     label-seg : (address segment-info) = get(segments, seg-name)
     #     lrow->address = label-seg->address + lrow->segment-offset
     #     trace-sssns("label " lrow->key " is at address " lrow->address)
     #     lrow += 16  # row-size
@@ -1589,18 +1589,19 @@ $compute-addresses:label-loop:
 #?     # . . discard args
 #?     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
 #?     # }}}
-    # label-seg/EDX : (address segment-info) = get(segments, seg-name, row-size=16)
+    # label-seg/EDX : (address segment-info) = get(segments, seg-name, row-size=16, "segment table")
     # . save EAX
     50/push-EAX
     # . EAX = get(segments, seg-name, row-size=16)
     # . . push args
+    68/push  "segment table"/imm32
     68/push  0x10/imm32/row-size
     52/push-EDX
     ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           8/disp8         .                 # push *(EBP+8)
     # . . call
     e8/call  get/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0xc/imm32         # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0x10/imm32        # add to ESP
     # . EDX = EAX
     89/copy                         3/mod/direct    2/rm32/EDX    .           .             .           0/r32/EAX   .               .                 # copy EAX to EDX
     # . restore EAX
@@ -2264,16 +2265,17 @@ $emit-segments:check-metadata:
 #?     # . . discard args
 #?     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
 #?     # }}}
-    # info/ESI = get-slice(labels, datum, row-size=16)
-    # . EAX = get-slice(labels, datum, row-size=16)
+    # info/ESI = get-slice(labels, datum, row-size=16, "label table")
+    # . EAX = get-slice(labels, datum, row-size=16, "label table")
     # . . push args
+    68/push  "label table"/imm32
     68/push  0x10/imm32/row-size
     57/push-EDI
     ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           0x14/disp8      .                 # push *(EBP+20)
     # . . call
     e8/call  get-slice/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0xc/imm32         # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0x10/imm32        # add to ESP
     # . ESI = EAX
     89/copy                         3/mod/direct    6/rm32/ESI    .           .             .           0/r32/EAX   .               .                 # copy EAX to ESI
 $emit-segments:check-global-variable:
@@ -3377,15 +3379,16 @@ emit-elf-header:  # out : (address buffered-file), segments : (address stream {s
     # *Elf_e_entry = get(labels, "Entry")->address
     # . EAX = labels
     8b/copy                         1/mod/*+disp8   5/rm32/EBP    .           .             .           0/r32/EAX   0x10/disp8      .                 # copy *(EBP+16) to EAX
-    # . label-info/EAX = get(labels, "Entry", row-size=16)
+    # . label-info/EAX = get(labels, "Entry", row-size=16, "label table")
     # . . push args
+    68/push  "label table"/imm32
     68/push  0x10/imm32/row-size
     68/push  "Entry"/imm32
     50/push-EAX
     # . . call
     e8/call  get/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0xc/imm32         # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               0x10/imm32        # add to ESP
     # . EAX = label-info->address
     8b/copy                         1/mod/*+disp8   0/rm32/EAX    .           .             .           0/r32/EAX   8/disp8         .                 # copy *(EAX+8) to EAX
     # . *Elf_e_entry = EAX
diff --git a/apps/tests b/apps/tests
index 52af8441..fb27af91 100755
--- a/apps/tests
+++ b/apps/tests
Binary files differ