sdl.s 424 B

123456789101112131415161718192021222324252627282930
  1. .define Sdi, Sdo
  2. .sect .text
  3. .sect .rom
  4. .sect .data
  5. .sect .bss
  6. .sect .text
  7. ! The subroutine Sdi takes a fourbyte word and stores it
  8. ! at the address in registerpair AX.
  9. ! If the address is in zeropage, Sdo is used.
  10. Sdi:
  11. stx ADDR ! address (lowbyte)
  12. sta ADDR+1 ! address (highbyte)
  13. Sdo:
  14. ldy #0
  15. 1: jsr Pop
  16. pha
  17. txa
  18. sta (ADDR),y ! store lowbyte
  19. iny
  20. pla
  21. sta (ADDR),y ! store highbyte
  22. iny
  23. cpy #4
  24. bne 1b
  25. rts