From 21cbede5330d7fd61412a299aaabc5e6c2879066 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 10 Feb 2025 14:32:37 +0100 Subject: Improve wording on saving registers by the caller MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3634079..144c28e 100644 --- a/README.md +++ b/README.md @@ -310,12 +310,11 @@ suffice, while other times using the memory might be needed. In any case: ## Registers are to be saved by the caller -To make things easier when implementing functions, as a caller don't expect -values on registers to survive to a function call. If there is important -information to be kept or updated across calls, make sure to shadow it on memory -addresses which are guaranteed to not be touched (on that check on the -function's documentation!). Another option is to use the stack, but do so with -caution as stack overflows are a real danger here. +As a general rule, as a caller don't expect values on registers to survive to a +function call. If there is important information to be kept or updated across +calls, make sure to shadow it on memory addresses which are guaranteed to not be +touched (on that check on the function's documentation!). Another option is to +use the stack, but do so with caution as stack overflows are a real danger here. ## Reserve return values and arguments into zeropage -- cgit v1.2.3