From: Lukas Krickl Date: Sat, 24 May 2025 15:29:59 +0000 (+0200) Subject: sys: Added farcall sys call X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=655c16d46fbe185e97694f903c6e9ee0935da15a;p=gbrg%2F.git sys: Added farcall sys call --- diff --git a/src/jmp.inc b/src/jmp.inc index aa09be9..b5eaead 100644 --- a/src/jmp.inc +++ b/src/jmp.inc @@ -8,10 +8,25 @@ rst_panic: ; rst 0008 ; simple call to hl -call_hl: +sys_call_hl: jp hl -.fill 0, 0x40 - $ +.fill 0, 0x10 - $ + + ; rst 0010 + ; farcall + ; inputs: + ; a: bank + ; hl: routine ptr +sys_farcall: + ; TODO: save current bank + ; TODO: switch bank + call_hl + ; TODO: switch bank + ret + + +.fill 0, 0x40 - $ ; interrupt vectors ;============= diff --git a/src/macros.inc b/src/macros.inc index 978698a..d3be0a3 100644 --- a/src/macros.inc +++ b/src/macros.inc @@ -241,3 +241,8 @@ #macro call_hl rst 0x08 #endmacro + + ; calls rst 0x10 +#macro farcall + rst 0x10 +#endmacro