diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-02-10 14:32:37 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-02-10 14:32:37 +0100 |
| commit | 21cbede5330d7fd61412a299aaabc5e6c2879066 (patch) | |
| tree | d9b646cda072da1658dd1311beaa718d357bb2f3 /README.md | |
| parent | 4fe5d54fb9dcd8e87b7a4eceff538f969df8ad3d (diff) | |
| download | style.nes-21cbede5330d7fd61412a299aaabc5e6c2879066.tar.gz style.nes-21cbede5330d7fd61412a299aaabc5e6c2879066.zip | |
Improve wording on saving registers by the caller
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -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 |
