From: Lukas Krickl Date: Sat, 10 May 2025 16:53:39 +0000 (+0200) Subject: sys: moved call_hl to rst 0x08 X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=f5d7a5f043a700be41c2decb642f4402895cdff8;p=gbrg%2F.git sys: moved call_hl to rst 0x08 --- diff --git a/src/jmp.inc b/src/jmp.inc index f6f0d18..aa09be9 100644 --- a/src/jmp.inc +++ b/src/jmp.inc @@ -4,8 +4,12 @@ rst_panic: di @forever: jp @forever - +.fill 0, 0x08 - $ + ; rst 0008 + ; simple call to hl +call_hl: + jp hl .fill 0, 0x40 - $ ; interrupt vectors diff --git a/src/macros.inc b/src/macros.inc index 0b73972..d6620fd 100644 --- a/src/macros.inc +++ b/src/macros.inc @@ -211,4 +211,9 @@ cp a, 0 jr nz, @x_loop REL @not_x_loop: +#endmacro + + ; calls rst 0x08 +#macro call_hl + rst 0x08 #endmacro diff --git a/src/state.s b/src/state.s index fef5c98..fc6e3cf 100644 --- a/src/state.s +++ b/src/state.s @@ -29,7 +29,7 @@ st_update: ; de = actor ptr pop de push de - call call_hl + rst 0x08 pop hl ; hl = original actor ptr = dst diff --git a/src/sys.s b/src/sys.s index 64ac1e2..6030700 100644 --- a/src/sys.s +++ b/src/sys.s @@ -49,6 +49,3 @@ call_tbl: ; hl = function value jp hl - ; simple call to hl -call_hl: - jp hl