Skip to content

Instantly share code, notes, and snippets.

@pinobatch
Created June 22, 2023 19:09
Show Gist options
  • Save pinobatch/f04482c035017c1f01e711f5e93b45a4 to your computer and use it in GitHub Desktop.
Save pinobatch/f04482c035017c1f01e711f5e93b45a4 to your computer and use it in GitHub Desktop.
RGBASM example for "Define symbols using arithmetic on imported symbols" (gbdev/rgbds#1146)
section "test", ROM0
def callerFunc_hLocalsEnd equ calleeFunc_hLocalsEnd + 3
callerFunc:
; omitted: do something with 3 bytes of local variables
; at calleeFunc_hLocalsEnd through callerFunc_hLocalsEnd - 1
call calleeFunc
ret
export callerFunc_hLocalsEnd
# the above is an example of non-working RGBASM source code for
# "Define symbols using arithmetic on imported symbols" (gbdev/rgbds#1146)
# <https://github.com/gbdev/rgbds/issues/1146>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment