sts.s 611 B

123456789101112131415161718192021222324252627282930313233
  1. .define Sts
  2. .sect .text
  3. .sect .rom
  4. .sect .data
  5. .sect .bss
  6. .sect .text
  7. ! This subroutine stores indirect a number of bytes.
  8. ! The number of bytes is in the registerpair AX.
  9. Sts:
  10. cmp #0
  11. bne 3f ! number of bytes > 255
  12. cpx #1
  13. bne 1f ! onebyte storage
  14. jsr Pop ! get the address
  15. jmp Sti1 ! store the byte
  16. 1: cpx #2
  17. bne 2f ! twobyte storage
  18. jsr Pop ! get the address
  19. jmp Sti ! store the word
  20. 2: cpx #4
  21. bne 3f ! fourbyte storage
  22. jsr Pop ! get the address
  23. jmp Sdi ! store the double word
  24. 3: sta ARTH+1 ! objectsize > 4
  25. txa
  26. tay
  27. jsr Pop ! get address
  28. jmp Stil ! store the object