Commits

Jose Rodriguez committed 0d0998e

Added PUSHF
Library needed for the new floating point
stack scheme (it's done calling a subrotine)

Comments (0)

Files changed (2)

library-asm/pushf.asm

+
+; Routine to push Float pointed by HL 
+; Into the stack. Notice that the hl points to the last
+; 2 bytes of the FP number
+
+__FP_PUSH_REV:
+    pop bc
+    ld d, (hl)
+    dec hl
+    ld e, (hl)
+    dec hl
+    push de
+    ld d, (hl)
+    dec hl
+    ld e, (hl)
+    dec hl
+    push de
+    ld a, (hl)
+    push af
+    push bc
+    ret
+
+

library-asm/stackf.asm

 __FPSTACK_PUSH2: ; Pushes Current A ED CB registers and top of the stack on (SP + 4)
                  ; Second argument to push into the stack calculator is popped out of the stack
                  ; Since the caller routine also receives the parameters into the top of the stack
-                 ; For bytes must be removed from SP before pop them out
+                 ; four bytes must be removed from SP before pop them out
 
     call __FPSTACK_PUSH ; Pushes A ED CB into the FP-STACK
     exx