csa4.s 493 B

123456789101112131415161718192021222324252627282930
  1. .sect .text; .sect .rom; .sect .data; .sect .bss
  2. .define .csa4
  3. .sect .text
  4. .csa4:
  5. ! bx, descriptor address
  6. ! ax, dx: index
  7. mov cx,(bx) ! default
  8. sub ax,2(bx)
  9. ! ignore high order word; if non-zero, the
  10. ! case descriptor would not fit anyway
  11. cmp ax,6(bx)
  12. ja 1f
  13. 2:
  14. sal ax,1
  15. add bx,ax
  16. mov bx,10(bx)
  17. test bx,bx
  18. jnz 2f
  19. 1:
  20. mov bx,cx
  21. test bx,bx
  22. jnz 2f
  23. .extern ECASE
  24. .extern .fat
  25. mov ax,ECASE
  26. push ax
  27. jmp .fat
  28. 2:
  29. jmp bx