-
-
Save pinobatch/69ab4f1ae82ea1d7e6b532388514f4dc to your computer and use it in GitHub Desktop.
ca65 example for "Define symbols using arithmetic on imported symbols" (gbdev/rgbds#1146)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.segment "CODE" | |
.import calleeFunc, calleeFunc_hLocalsEnd | |
callerFunc_hLocalsEnd = calleeFunc_hLocalsEnd + 3 | |
.proc callerFunc | |
; omitted: do something with 3 bytes of local variables | |
; at calleeFunc_hLocalsEnd through callerFunc_hLocalsEnd - 1 | |
jsr calleeFunc | |
rts | |
.endproc | |
.export callerFunc, callerFunc_hLocalsEnd | |
# the above is an example of working ca65 source code for | |
# "Define symbols using arithmetic on imported symbols" | |
# <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