cells: Added copy code for next cell update routine
authorLukas Krickl <lukas@krickl.dev>
Tue, 8 Apr 2025 15:04:30 +0000 (17:04 +0200)
committerLukas Krickl <lukas@krickl.dev>
Tue, 8 Apr 2025 15:04:30 +0000 (17:04 +0200)
src/cells.s

index 8af5976a7226c32507191ccae452a9a42f10b91b..fb774b880201868222726de76382af36368745f9 100644 (file)
@@ -32,8 +32,22 @@ cell_update:
   ; restore cell ptr
   pop de
 
-  ; TODO: write new s_st_routine 
+  ; write new s_st_routine 
   ; if bc is not 0000
+  ld a, b
+  or a, c
+  ret z 
+  
+  inc de
+  inc de
+  ; de = c_st_routine 
+
+  ; store next routine 
+  ld a, b
+  ld [de], a
+  ld a, c
+  inc de
+  ld [de], a
 
   ret