sli.s 461 B

1234567891011121314151617181920212223242526272829303132333435
  1. .sect .text; .sect .rom; .sect .data; .sect .bss
  2. .sect .text
  3. .define .sli
  4. ! #bytes in ax
  5. .sli:
  6. pop dx ! return address
  7. cmp ax,2
  8. jne 1f
  9. pop ax
  10. pop cx
  11. sal ax,cl
  12. push ax
  13. jmp dx
  14. 1:
  15. cmp ax,4
  16. jne 9f
  17. pop cx
  18. jcxz 2f
  19. pop ax
  20. pop bx
  21. 3:
  22. sal ax,1
  23. rcl bx,1
  24. loop 3b
  25. push bx
  26. push ax
  27. 2:
  28. jmp dx
  29. 9:
  30. .extern EODDZ
  31. .extern .trp
  32. mov ax,EODDZ
  33. push dx
  34. jmp .trp