From 7f2aea60c98fea460d7736208dcc4b22552a48f7 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sat, 19 Dec 2020 03:36:52 +0100 Subject: [PATCH] addition --- docs/source/technical.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/source/technical.rst b/docs/source/technical.rst index 8acfadad3..2a597890b 100644 --- a/docs/source/technical.rst +++ b/docs/source/technical.rst @@ -54,7 +54,8 @@ These are usually declarations of kernel (ROM) routines or low-level assembly on that have their arguments solely passed into specific registers. Sometimes even via a processor status flag such as the Carry flag. Return values also via designated registers. - +The processor status flag is preserved on returning so you can immediately act on that for instance +via a special branch instruction such as ``if_z`` or ``if_cs`` etc. regular subroutines @@ -73,8 +74,12 @@ regular subroutines Float values will be put in the ``FAC1`` float 'register' (Basic allocated this somewhere in ram). - Calls to builtin functions are treated in a special way: Generally if they have a single argument it's passed in a register or register pair. Multiple arguments are passed like a normal subroutine, into variables. Some builtin functions have a fully custom implementation. + + +The compiler will warn about routines that are called and that return a value, if you're not +doing something with that returnvalue. This can be on purpuse if you're simply not interested in it. +Use the ``void`` keyword in front of the subroutine call to get rid of the warning in that case.