ah well maybe you're right...
I think i need to learn one more thing: all these subs can operate only on input rxx variables? there are no "global" variables in asm like in higher programming languages?
Again, you should review what a compiler does
For example, the c compiler/linker:
Global variables (including static "globals") are placed in either the BSS or DATA section during the link stage, and a symbol is generated for each global variable.
All references to that global variable are replaced by a reference to that memory location.
When the program is first run, the BSS section is zeroed out (for globals that are initialized to zero). Initialized globals are in the DATA section. When the program is run, the DATA section is memcpy'd from the INITDATA subsection (typcally located in the read only TEXT section)
Local variables are generally located in the stack. When a function is called, stack area is reserved for all local variables, and they are either initialized to zero or their "initial" value by direct asm instructions.
Parameters are generally passed in registers (as you discovered)
If there are too many parameters to pass by registers, typically the compiler will put them on the stack.
Finally, if the function being called uses registers that it knows are in use by the caller, it typically saves those registers on the stack, does its thing with them, then restores those values from the stack before returning.
BTW, those ME7 variables we log? They are ALL globals. They all exist in memory. If they were in registers we couldn't log them.