summaryrefslogtreecommitdiff
path: root/include/macros.inc
diff options
context:
space:
mode:
Diffstat (limited to 'include/macros.inc')
-rw-r--r--include/macros.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/macros.inc b/include/macros.inc
index 8b95257..2b5b6b8 100644
--- a/include/macros.inc
+++ b/include/macros.inc
@@ -9,3 +9,15 @@ farcall: macro
pop af
call _farcall
endm
+
+farjp: macro
+ push af
+ ld a, LOW(\1)
+ ld [w_farcall_target + 0], a
+ ld a, HIGH(\1)
+ ld [w_farcall_target + 1], a
+ ld a, BANK(\1)
+ ld [w_bank_temp], a
+ pop af
+ jp _farjp
+endm