iload32.asm 695 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ; __FASTCALL__ routine which
  2. ; loads a 32 bits integer into DE,HL
  3. ; stored at position pointed by POINTER HL
  4. ; DE,HL <-- (HL)
  5. ;
  6. __ILOAD32:
  7. ldy #$00 ;- ld e,(hl)
  8. lda (z80_hl),y
  9. sta z80_e
  10. inc z80_l ;- inc hl
  11. bne *+4
  12. inc z80_h
  13. ldy #$00 ;- ld d,(hl)
  14. lda (z80_hl),y
  15. sta z80_d
  16. inc z80_l ;- inc hl
  17. bne *+4
  18. inc z80_h
  19. ldy #$00 ;- ld a,(hl)
  20. lda (z80_hl),y
  21. sta z80_a
  22. inc z80_l ;- inc hl
  23. bne *+4
  24. inc z80_h
  25. ldy #$00 ;- ld h,(hl)
  26. lda (z80_hl),y
  27. sta z80_h
  28. lda z80_a ;- ld l,a
  29. sta z80_l
  30. lda z80_e ;- ex de,hl
  31. ldx z80_l
  32. stx z80_e
  33. sta z80_l
  34. lda z80_d
  35. ldx z80_h
  36. stx z80_d
  37. sta z80_h
  38. rts ;- ret