about summary refs log tree commit diff stats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/dquotes.subx27
1 files changed, 21 insertions, 6 deletions
diff --git a/apps/dquotes.subx b/apps/dquotes.subx
index 6f961e34..4abeeae5 100644
--- a/apps/dquotes.subx
+++ b/apps/dquotes.subx
@@ -85,7 +85,9 @@ $subx-dquotes-main:end:
 subx-dquotes:  # in: (addr buffered-file), out: (addr buffered-file)
     # pseudocode:
     #   var line: (stream byte 512)
-    #   var new-data-segment: (handle stream byte) = new-stream(Heap, Segment-size, 1)
+    #   var new-data-segment-handle: (handle stream byte)
+    #   new-stream(Heap, Segment-size, 1, new-data-segment-handle)
+    #   var new-data-segment: (addr stream byte) = lookup(new-data-segment-handle)
     #
     #   write(new-data-segment, "== data\n")
     #      # TODO: When it was originally written dquotes ran before assort, so
@@ -135,17 +137,30 @@ subx-dquotes:  # in: (addr buffered-file), out: (addr buffered-file)
     68/push  0/imm32/end
     68/push  0/imm32/start
     89/copy                         3/mod/direct    2/rm32/edx    .           .             .           4/r32/esp   .               .                 # copy esp to edx
-    # new-data-segment/edi = new-stream(Heap, Segment-size, 1)
-    # . eax = new-stream(Heap, Segment-size, 1)
+    # var new-data-segment-handle/edi: (handle stream byte)
+    68/push  0/imm32
+    68/push  0/imm32
+    89/copy                         3/mod/direct    7/rm32/edi    .           .             .           4/r32/esp   .               .                 # copy esp to edi
+    # new-stream(Heap, Segment-size, 1, new-data-segment-handle)
     # . . push args
+    57/push-edi
     68/push  1/imm32
     ff          6/subop/push        0/mod/indirect  5/rm32/.disp32            .             .           .           Segment-size/disp32               # push *Segment-size
     68/push  Heap/imm32
     # . . call
     e8/call  new-stream/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               0xc/imm32         # add to esp
-    # . edi = eax
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               0x10/imm32        # add to esp
+    # var new-data-segment/edi: (addr stream byte) = lookup(*new-data-segment-handle)
+    # . eax = lookup(*new-data-segment-handle)
+    # . . push args
+    ff          6/subop/push        1/mod/*+disp8   7/rm32/edi    .           .             .           .           4/disp8         .                 # push *(edi+4)
+    ff          6/subop/push        0/mod/indirect  7/rm32/edi    .           .             .           .           .               .                 # push *edi
+    # . . call
+    e8/call  lookup/disp32
+    # . . discard args
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
+    # . new-data-segment = eax
     89/copy                         3/mod/direct    7/rm32/edi    .           .             .           0/r32/eax   .               .                 # copy eax to edi
     # write(new-data-segment, "== data\n")
     # . . push args
@@ -272,7 +287,7 @@ $subx-dquotes:break:
     81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               4/imm32           # add to esp
 $subx-dquotes:end:
     # . reclaim locals
-    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               0x214/imm32       # add to esp
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               0x21c/imm32       # add to esp
     # . restore registers
     5f/pop-to-edi
     5e/pop-to-esi
nger/commit/ranger.py?h=v1.6.0&id=5c210a96a0e4bb74cd096edb045fc3814b78450c'>5c210a96 ^
3de15ddd ^

fb275079 ^

5c210a96 ^
3d566884 ^
e30d16cb ^
621a1a39 ^
9bc5d95c ^
c44b726e ^
465bff73 ^




f8e96a97 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51