| GBDK libraries documentation | ||
|---|---|---|
| Prev | Chapter 4. Assembly language | Next | 
C normally expects registers to be preserved across a function call. However in this case as DE is used as the return value and HL is used for anything, only BC needs to be preserved.
Getting at C variables is slightly tricky due to how local variables are allocated on the stack. However you shouldn't be using the local variables of a calling function in any case. Global variables can be accessed by name by adding an underscore.
| Prev | Home | Next | 
| Calling convention | Up | Segments |