iloadf.asm 1017 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. ; __FASTCALL__ routine which
  2. ; loads a 40 bits floating point into A ED CB
  3. ; stored at position pointed by POINTER HL
  4. ;A DE, BC <-- ((HL))
  5. ;
  6. __ILOADF:
  7. ldy #$00 ;- ld a,(hl)
  8. lda (z80_hl),y
  9. sta z80_a
  10. inc z80_l ;- inc hl
  11. bne *+4
  12. inc z80_h
  13. ldy #$00 ;- ld h,(hl)
  14. lda (z80_hl),y
  15. sta z80_h
  16. lda z80_a ;- ld l,a
  17. sta z80_l
  18. ;
  19. ; __FASTCALL__ routine which
  20. ; loads a 40 bits floating point into A ED CB
  21. ; stored at position pointed by POINTER HL
  22. ;A DE, BC <-- (HL)
  23. ;
  24. __LOADF: ; Loads a 40 bits FP number from address pointed by HL
  25. ldy #$00 ;- ld a,(hl)
  26. lda (z80_hl),y
  27. sta z80_a
  28. inc z80_l ;- inc hl
  29. bne *+4
  30. inc z80_h
  31. ldy #$00 ;- ld e,(hl)
  32. lda (z80_hl),y
  33. sta z80_e
  34. inc z80_l ;- inc hl
  35. bne *+4
  36. inc z80_h
  37. ldy #$00 ;- ld d,(hl)
  38. lda (z80_hl),y
  39. sta z80_d
  40. inc z80_l ;- inc hl
  41. bne *+4
  42. inc z80_h
  43. ldy #$00 ;- ld c,(hl)
  44. lda (z80_hl),y
  45. sta z80_c
  46. inc z80_l ;- inc hl
  47. bne *+4
  48. inc z80_h
  49. ldy #$00 ;- ld b,(hl)
  50. lda (z80_hl),y
  51. sta z80_b
  52. rts ;- ret