Skip to content

Latest commit

 

History

History
2 lines (2 loc) · 613 Bytes

code-standard.md

File metadata and controls

2 lines (2 loc) · 613 Bytes
  • The subroutine calling convention used in GBA games is that registers r0-r3 are input registers which are not preserved upon return; r4-r10 are preserved (i.e. they are pushed on the stack for the duration of the subroutine if they are used within said subroutine, otherwise untouched). If more than four input parameters are needed for a subroutine, they should be pushed on the stack.
  • All subroutines and data definitions must have proper comments in order to keep the code comprehensible. Subroutine comments should describe what the subroutine does and detail eventual input/output parameters.