From d70d63ee244bf9b654533ab1d5f4d33b295c699e Mon Sep 17 00:00:00 2001 From: WeebDataHoarder <57538841+weebdatahoarder@users.noreply.github.com> Date: Sun, 3 Jan 2021 04:54:30 +0100 Subject: [PATCH] Added P2-P8 offsets --- asm/stdlib.asm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/asm/stdlib.asm b/asm/stdlib.asm index 9bff7c4..099d484 100644 --- a/asm/stdlib.asm +++ b/asm/stdlib.asm @@ -10,6 +10,15 @@ .constant P0 std_PARAMETER_0 .constant P1 std_PARAMETER_1 +; These are offset registers to be called with ~3 to access stack parameters +.constant P2 %1, +1 ; Equivalent to same address in POPP , 1 +.constant P3 %1, +2 ; Equivalent to same address in POPP , 2 +.constant P4 %1, +3 ; Equivalent to same address in POPP , 3 +.constant P5 %1, +4 ; Equivalent to same address in POPP , 4 +.constant P6 %1, +5 ; Equivalent to same address in POPP , 5 +.constant P7 %1, +6 ; Equivalent to same address in POPP , 6 +.constant P8 %1, +7 ; Equivalent to same address in POPP , 7 + ; Ephemeral registers to be used within functions. These values may not be kept when calling other functions. They can be used when returning values if necessary. ; Some std functions might restore these values. .constant std_EPHEMERAL_REGISTER_0 BSM_SCRATCH_START +0x1F0