pstoref.asm 747 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ; Stores FP number in A ED CB at location HL+IX
  2. ; HL = Offset
  3. ; IX = Stack Frame
  4. ; A ED CB = FP Number
  5. ;
  6. #include once <storef.asm>
  7. ;
  8. ; Stored a float number in A ED CB into the address pointed by IX + HL
  9. __PSTOREF:
  10. lda z80_e ;- push de
  11. pha
  12. lda z80_d
  13. pha
  14. lda z80_e ;- ex de,hl ; DE <- HL
  15. ldx z80_l
  16. stx z80_e
  17. sta z80_l
  18. lda z80_d
  19. ldx z80_h
  20. stx z80_d
  21. sta z80_h
  22. lda z80_ix ;- push ix
  23. pha
  24. lda z80_ix+1
  25. pha
  26. pla ;- pop hl ; HL <- IX
  27. sta z80_h
  28. pla
  29. sta z80_l
  30. clc ;- add hl,de ; HL <- IX + DE
  31. lda z80_l
  32. adc z80_e
  33. sta z80_l
  34. lda z80_h
  35. adc z80_d
  36. sta z80_h
  37. pla ;- pop de
  38. sta z80_d
  39. pla
  40. sta z80_e
  41. jmp __STOREF ;- jp __STOREF