Created
March 27, 2016 08:45
-
-
Save rkujawa/71ba2f1af9bbccd36b63 to your computer and use it in GitHub Desktop.
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
.macro fcall fname, arg1, arg2, arg3, arg4, arg5 | |
ldy #0 | |
.ifnb \arg1 | |
ldx #\arg1 | |
stx FARGS_ARG,Y | |
iny | |
.endif | |
.ifnb \arg2 | |
ldx #\arg2 | |
stx FARGS_ARG,Y | |
iny | |
.endif | |
.ifnb \arg3 | |
ldx #\arg3 | |
stx FARGS_ARG,Y | |
iny | |
.endif | |
.ifnb \arg4 | |
ldx #\arg4 | |
stx FARGS_ARG,Y | |
iny | |
.endif | |
.ifnb \arg5 | |
ldx #\arg5 | |
stx FARGS_ARG,Y | |
iny | |
.endif | |
sty FARGS_NUM | |
jsr \fname | |
.endm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment