ngi.s 414 B

123456789101112131415161718192021222324252627282930
  1. .sect .text; .sect .rom; .sect .data; .sect .bss
  2. .sect .text
  3. .define .ngi
  4. ! #bytes in ax
  5. .ngi:
  6. pop bx ! return address
  7. cmp ax,2
  8. jne 1f
  9. pop cx
  10. neg cx
  11. push cx
  12. jmp bx
  13. 1:
  14. cmp ax,4
  15. jne 9f
  16. pop dx
  17. pop ax
  18. neg ax
  19. neg dx
  20. sbb ax,0
  21. push dx
  22. push ax
  23. jmp bx
  24. 9:
  25. .extern EODDZ
  26. .extern .trp
  27. mov ax,EODDZ
  28. push bx
  29. jmp .trp