rmu.s 326 B

123456789101112131415161718192021
  1. .sect .text; .sect .rom; .sect .data; .sect .bss
  2. .sect .text
  3. .define .rmu
  4. ! #bytes in eax
  5. .rmu:
  6. pop ebx ! return address
  7. cmp eax,4
  8. jne 1f
  9. pop eax
  10. xor edx,edx
  11. pop ecx
  12. idiv ecx
  13. push edx
  14. jmp ebx
  15. 1:
  16. .extern EODDZ
  17. .extern .trp
  18. mov eax,EODDZ
  19. push ebx
  20. jmp .trp