sys: moved call_hl to rst 0x08
authorLukas Krickl <lukas@krickl.dev>
Sat, 10 May 2025 16:53:39 +0000 (18:53 +0200)
committerLukas Krickl <lukas@krickl.dev>
Sat, 10 May 2025 16:53:39 +0000 (18:53 +0200)
src/jmp.inc
src/macros.inc
src/state.s
src/sys.s

index f6f0d18c45d564081b5af4726214c1d60039e302..aa09be99387a62208cc09632ae391910d88d9225 100644 (file)
@@ -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
index 0b7397268e67262a41f312cd65ef1cfb43fae726..d6620fdeb0a440e5d4f471a90c53ae5cc53e747d 100644 (file)
     cp a, 0
     jr nz, @x_loop REL
 @not_x_loop:
+#endmacro
+  
+  ; calls rst 0x08
+#macro call_hl
+  rst 0x08 
 #endmacro
index fef5c98c918f7bcc0298b51c867c0caf0cf5fb63..fc6e3cfef36e12443f870540ff8db7ec8c5d2ed5 100644 (file)
@@ -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
 
index 64ac1e254ff97818dd5eb3a0ed2bad28ec112bbf..6030700936b04fec34d23cccbc50b0c166f8e577 100644 (file)
--- 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