sts.s 445 B

123456789101112131415161718192021222324252627282930313233
  1. #include "em_abs.h"
  2. .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
  3. .define .sts
  4. ! $Id$
  5. .sts:
  6. movl (sp)+,r2
  7. cmpl r0,$4
  8. beql I1
  9. pushl $EILLINS
  10. jmp .fat
  11. I1:
  12. movl (sp)+,r0 ! number of bytes in r0
  13. movl (sp)+,r1 ! address in r1
  14. cmpl r0,$1
  15. beql I3
  16. cmpl r0,$2
  17. beql I4
  18. ashl $-2,r0,r0
  19. I2:
  20. movl (sp)+,(r1)+
  21. sobgtr r0,I2
  22. jmp (r2)
  23. I3:
  24. movl (sp)+,r0
  25. movb r0,(r1)
  26. jmp (r2)
  27. I4:
  28. movl (sp)+,r0
  29. movw r0,(r1)
  30. jmp (r2)