diff options
-rw-r--r-- | subx/apps/subx-common.subx | 1 | ||||
-rw-r--r-- | subx/apps/survey.subx | 189 |
2 files changed, 0 insertions, 190 deletions
diff --git a/subx/apps/subx-common.subx b/subx/apps/subx-common.subx index 60bb6cc2..2ebf9807 100644 --- a/subx/apps/subx-common.subx +++ b/subx/apps/subx-common.subx @@ -53,7 +53,6 @@ get: # table : (address stream {string, _}), key : (address string), row-size : # curr/ECX = table->data 8d/copy-address 1/mod/*+disp8 6/rm32/ESI . . . 1/r32/ECX 0xc/disp8 . # copy ESI+12 to ECX # max/EDX = table->data + table->write - # HERE: table->write is too large 8b/copy 0/mod/indirect 6/rm32/ESI . . . 2/r32/EDX . . # copy *ESI to EDX 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ECX 2/index/EDX . 2/r32/EDX . . # copy ECX+EDX to EDX $get:search-loop: diff --git a/subx/apps/survey.subx b/subx/apps/survey.subx index 7f44be4c..ce6ad8c7 100644 --- a/subx/apps/survey.subx +++ b/subx/apps/survey.subx @@ -135,52 +135,6 @@ convert: # in : (address buffered-file), out : (address buffered-file) -> <void 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 - # dump labels->write {{{ - # . write(2/stderr, "labels->write initially: ") - # . . push args - 68/push "labels->write initially: "/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 - # . clear-stream(Stderr+4) - # . . save EAX - 50/push-EAX - # . . push args - b8/copy-to-EAX Stderr/imm32 - 05/add-to-EAX 4/imm32 - 50/push-EAX - # . . call - e8/call clear-stream/disp32 - # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP - # . . restore EAX - 58/pop-to-EAX - # . print-int32-buffered(Stderr, labels) - # . . push args - ff 6/subop/push 0/mod/indirect 2/rm32/EDX . . . . . . # push *EDX - 68/push Stderr/imm32 - # . . call - e8/call print-int32-buffered/disp32 - # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP - # . flush(Stderr) - # . . push args - 68/push Stderr/imm32 - # . . call - e8/call flush/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 - 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 - # }}} # compute-offsets(in, segments, labels) # . . push args 52/push-EDX @@ -190,52 +144,6 @@ convert: # in : (address buffered-file), out : (address buffered-file) -> <void e8/call compute-offsets/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP - # dump labels->write {{{ - # . write(2/stderr, "labels->write after compute-offsets: ") - # . . push args - 68/push "labels->write after compute-offsets: "/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 - # . clear-stream(Stderr+4) - # . . save EAX - 50/push-EAX - # . . push args - b8/copy-to-EAX Stderr/imm32 - 05/add-to-EAX 4/imm32 - 50/push-EAX - # . . call - e8/call clear-stream/disp32 - # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP - # . . restore EAX - 58/pop-to-EAX - # . print-int32-buffered(Stderr, labels) - # . . push args - ff 6/subop/push 0/mod/indirect 2/rm32/EDX . . . . . . # push *EDX - 68/push Stderr/imm32 - # . . call - e8/call print-int32-buffered/disp32 - # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP - # . flush(Stderr) - # . . push args - 68/push Stderr/imm32 - # . . call - e8/call flush/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 - 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 - # }}} # compute-addresses(segments, labels) # . . push args 52/push-EDX @@ -244,52 +152,6 @@ convert: # in : (address buffered-file), out : (address buffered-file) -> <void e8/call compute-addresses/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x8/imm32 # add to ESP - # dump labels->write {{{ - # . write(2/stderr, "labels->write after compute-addresses: ") - # . . push args - 68/push "labels->write after compute-addresses: "/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 - # . clear-stream(Stderr+4) - # . . save EAX - 50/push-EAX - # . . push args - b8/copy-to-EAX Stderr/imm32 - 05/add-to-EAX 4/imm32 - 50/push-EAX - # . . call - e8/call clear-stream/disp32 - # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP - # . . restore EAX - 58/pop-to-EAX - # . print-int32-buffered(Stderr, labels) - # . . push args - ff 6/subop/push 0/mod/indirect 2/rm32/EDX . . . . . . # push *EDX - 68/push Stderr/imm32 - # . . call - e8/call print-int32-buffered/disp32 - # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP - # . flush(Stderr) - # . . push args - 68/push Stderr/imm32 - # . . call - e8/call flush/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 - 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(in) # . . push args ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 8/disp8 . # push *(EBP+8) @@ -1431,7 +1293,6 @@ $compute-addresses:segment-break: #? # }}} # ESI = labels 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 6/r32/ESI 0xc/disp8 . # copy *(EBP+12) to ESI -#? $dump-stream-at-ESI: # lrow/EAX = labels->data 8d/copy-address 1/mod/*+disp8 6/rm32/ESI . . . 0/r32/EAX 0xc/disp8 . # copy ESI+12 to EAX # max/ECX = labels->data + labels->write @@ -1734,55 +1595,6 @@ emit-output: # in : (address buffered-file), out : (address buffered-file), seg e8/call emit-headers/disp32 # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0xc/imm32 # add to ESP - # dump labels->write {{{ - # . write(2/stderr, "labels->write after emit-headers: ") - # . . push args - 68/push "labels->write after emit-headers: "/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 - # . clear-stream(Stderr+4) - # . . save EAX - 50/push-EAX - # . . push args - b8/copy-to-EAX Stderr/imm32 - 05/add-to-EAX 4/imm32 - 50/push-EAX - # . . call - e8/call clear-stream/disp32 - # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP - # . . restore EAX - 58/pop-to-EAX - # . print-int32-buffered(Stderr, labels) - # . . push args - 52/push-EDX - 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 2/r32/EDX 8/disp8 . # copy *(EBP+8) to EDX - ff 6/subop/push 0/mod/indirect 2/rm32/EDX . . . . . . # push *EDX - 68/push Stderr/imm32 - # . . call - e8/call print-int32-buffered/disp32 - # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP - 5a/pop-to-EDX - # . flush(Stderr) - # . . push args - 68/push Stderr/imm32 - # . . call - e8/call flush/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 - 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 - # }}} # emit-segments(in, out, segments, labels) # . . push args ff 6/subop/push 1/mod/*+disp8 5/rm32/EBP . . . . 0x14/disp8 . # push *(EBP+20) @@ -2628,7 +2440,6 @@ 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 -#? $dump-stream-at-EAX: # . label-info/EAX = get(labels, "Entry", row-size=16) # . . push args 68/push 0x10/imm32/row-size |