cii.s 560 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. .sect .text; .sect .rom; .sect .data; .sect .bss
  2. .define .cii
  3. .sect .text
  4. .cii:
  5. pop bx ! return address
  6. ! pop cx, dest. size
  7. ! pop dx, src. size
  8. ! ax is first word of source
  9. cmp dx,1
  10. jne 2f
  11. cbw
  12. mov dx,2
  13. 2:
  14. cmp dx,cx
  15. je 8f
  16. cmp dx,2
  17. je 1f
  18. cmp dx,4
  19. jne 9f
  20. cmp cx,2
  21. jne 9f
  22. pop dx
  23. 8:
  24. jmp bx
  25. 1:
  26. cmp cx,4
  27. jne 9f
  28. cwd
  29. push dx
  30. jmp bx
  31. 9:
  32. push ax ! push low source
  33. .extern EILLINS
  34. .extern .fat
  35. mov ax,EILLINS
  36. push ax
  37. jmp .fat