rmu.s 527 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. .sect .text; .sect .rom; .sect .data; .sect .bss
  2. .sect .text
  3. .define .rmu
  4. ! #bytes in ax
  5. .rmu:
  6. pop bx ! return address
  7. cmp ax,2
  8. jne 1f
  9. pop ax
  10. xor dx,dx
  11. pop cx
  12. idiv cx
  13. push dx
  14. jmp bx
  15. 1:
  16. cmp ax,4
  17. jne 9f
  18. pop ax
  19. pop dx
  20. pop si
  21. pop di
  22. push bx
  23. push di
  24. push si
  25. push dx
  26. push ax
  27. .extern .rmu4
  28. call .rmu4
  29. pop bx
  30. push dx
  31. push ax
  32. jmp bx
  33. 9:
  34. .extern EODDZ
  35. .extern .trp
  36. mov ax,EODDZ
  37. push bx
  38. jmp .trp