mli.s 548 B

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