loi.s 381 B

12345678910111213141516171819202122
  1. .define Loi, Lext
  2. .sect .text
  3. .sect .rom
  4. .sect .data
  5. .sect .bss
  6. .sect .text
  7. ! This subroutine performs an indirect load on a word of two bytes.
  8. ! Lext is used when the address is already in zeropage.
  9. Loi:
  10. stx ADDR ! address of object (lowbyte)
  11. sta ADDR+1 ! address of object (highbyte)
  12. Lext:
  13. ldy #0
  14. lda (ADDR),y ! get lowbyte
  15. tax
  16. iny
  17. lda (ADDR),y ! get highbyte
  18. rts