From 41050d05d55d79ab31048eb76c4c240b8e518d0a Mon Sep 17 00:00:00 2001 From: Diego Lopez <2109094@upy.edu.mx> Date: Mon, 9 Mar 2026 13:11:10 -0600 Subject: [PATCH] update --- calling-convention/Output-explanation.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/calling-convention/Output-explanation.md b/calling-convention/Output-explanation.md index 802c004..123a9c5 100644 --- a/calling-convention/Output-explanation.md +++ b/calling-convention/Output-explanation.md @@ -21,4 +21,10 @@ Clean stack: [] RS: 0 Collected result: {'result': {'type': 'result', 'value': 42}} - +**Explanation:** +Since there is only one argument and it fits in a single register, it is +placed directly in `RA` (the first available argument register). +Before the call, the 4 caller-saved registers (R0-R3) are pushed onto the +stack to preserve their values. `RS` points to position 4, reflecting those +4 entries. After `undo_function_call`, the stack is empty, `RS` returns to 0, +and the result value `42` is successfully collected from `RA`.