summaryrefslogtreecommitdiff
path: root/design/mock/touch.py
diff options
context:
space:
mode:
Diffstat (limited to 'design/mock/touch.py')
-rw-r--r--design/mock/touch.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/design/mock/touch.py b/design/mock/touch.py
index 0ec34a0..4a52488 100644
--- a/design/mock/touch.py
+++ b/design/mock/touch.py
@@ -633,6 +633,11 @@ def travel_step(g, d):
x = 976 + 16 + (len(" ".join(names)) + 1) * A
g.rect(x - 1, y + 3, len(cnt) * A + 2, ROW - 6, PAGE)
g.t(x, b(y), cnt, S, VERM, BOLD)
+ if d.get("aim"): # `aim`: the word's code address, to its row in the disassembly
+ a, row = d["aim"]
+ ya, yb = row_y(a) + 12, at[row] + 12
+ gen.arrow(g, [(976, ya), (950, ya), (950, yb), (943, yb)], CODE, 2, r=4, hl=7, hw=8)
+ g.frame(64 + C.DX_ADDR - 5, at[row], 6 * A + 10, ROW, CODE, 2)
if d.get("arm"):
a = d["arm"]
g.frame(976 + 184 + 12 * A + 30 - 5, row_y(a), 12 * A + 10, ROW, VERM, 2)
@@ -823,6 +828,13 @@ CARRY = [ # (number, frames, what, why, step, overrides)
]
+AIM = [("1", "42 to 72", "the aim", "aim = .step (the author's): the return address struck (42), the touch draws back as "
+ "the aim leaves the word, up the gutter's left lane onto the disassembly's right rule at 401272, the row after "
+ "the call (48 to 66), its address framed in code's ink as it lands; only then rsp's pin climbs (72 on)",
+ dict(CALL_BASE, k=(32, 33), notes=STATIC_CALL, top=ECE0, pins={"rsp": ECF0, "rbp": 0x7fffffffed00},
+ free={ECE0}, smarks={ECE8: {1: "strike"}}, base=(0x7fffffffed00, "rbp"), aim=(ECE8, 0x401272)))]
+
+
def carry_step(g, step, ov):
bx, at, sy = loop_frame(g, step, "tied", None, ov)
if ov.get("arm"): # the destination armed: the arm's frame on its value
@@ -881,3 +893,6 @@ if __name__ == "__main__":
"a pin's path drawn a few frames apart", PROLOGUE)
ways("48-tied-ways.png")
carry_sheet("56-carry.png")
+ strip_sheet("57-aim.png", "aim: a word holding a code address, and its row",
+ "call reverse with aim = .step, the instant after the return address is struck (46's third instant); the "
+ "kind is off unless a scene turns it on", AIM)