sts.s 327 B

1234567891011121314151617181920212223242526272829303132
  1. .define .sts
  2. .sect .text
  3. .sect .rom
  4. .sect .data
  5. .sect .bss
  6. .sect .text
  7. .sect .text
  8. .sts:
  9. movd tos, r3
  10. movd tos, r0
  11. movd tos, r1
  12. cmpqd 1, r0
  13. beq 1f
  14. cmpqd 2, r0
  15. beq 2f
  16. 3:
  17. movd tos, 0(r1)
  18. addqd 4, r1
  19. acbd -4, r0, 3b
  20. 4:
  21. movd r3, tos
  22. ret 0
  23. 1:
  24. movb tos, 0(r1)
  25. adjspd -3
  26. br 4b
  27. 2:
  28. movw tos, 0(r1)
  29. adjspd -2
  30. br 4b