From 5821a0f61241b3e83d251affc5a93ef0de5a9b2b Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 9 Jul 2019 16:50:29 -0700 Subject: clean up after a few calls --- subx/apps/survey | Bin 37321 -> 37339 bytes subx/apps/survey.subx | 13 +++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'subx') diff --git a/subx/apps/survey b/subx/apps/survey index 17fb88f4..e8e6c9e6 100755 Binary files a/subx/apps/survey and b/subx/apps/survey differ diff --git a/subx/apps/survey.subx b/subx/apps/survey.subx index e6ab7e1d..a4c6a5a4 100644 --- a/subx/apps/survey.subx +++ b/subx/apps/survey.subx @@ -486,6 +486,8 @@ $compute-offsets:label: 68/push "label '"/imm32 # . . call e8/call trace-slsls/disp32 + # . . discard args + 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x14/imm32 # add to ESP # trace-slsns("label '" word-slice/EDX "' is at offset '" *file-offset/EAX "'") # . . EAX = file-offset b8/copy-to-EAX compute-offsets:file-offset/imm32 @@ -499,6 +501,8 @@ $compute-offsets:label: 68/push "label '"/imm32 # . . call e8/call trace-slsns/disp32 + # . . discard args + 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x14/imm32 # add to ESP # continue e9/jump $compute-offsets:word-loop/disp32 $compute-offsets:segment: @@ -602,16 +606,17 @@ $compute-offsets:construct-next-segment: # seg->file-offset = *file-offset 8b/copy 0/mod/indirect 5/rm32/.disp32 . . 0/r32/EAX compute-offsets:file-offset/disp32 # copy *file-offset to EAX 89/copy 1/mod/*+disp8 3/rm32/EBX . . . 0/r32/EAX 4/disp8 . # copy EAX to *(EBX+4) - # trace-slsns("segment '", curr-segment-name, "' is at file offset ", seg->file-offset/EAX, "") - # . push args + # trace-slsns("segment '", curr-segment-name, "' is at file offset ", seg->file-offset, "") + # . . push args 68/push "."/imm32 50/push-EAX 68/push "' is at file offset "/imm32 68/push compute-offsets:curr-segment-name/imm32 68/push "segment '"/imm32 - # . call + # . . call e8/call trace-slsns/disp32 - # . discard args + # . . discard args + 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 0x14/imm32 # add to ESP # segment-offset = 0 c7 0/subop/copy 0/mod/indirect 5/rm32/.disp32 . . . compute-offsets:segment-offset/disp32 0/imm32 # copy to *segment-offset e9/jump $compute-offsets:line-loop/disp32 -- cgit 1.4.1-2-gfad0