csa4.s 435 B

123456789101112131415161718192021222324252627
  1. .sect .text; .sect .rom; .sect .data; .sect .bss
  2. .define .csa4
  3. .sect .text
  4. .csa4:
  5. ! ebx, descriptor address
  6. ! eax, index
  7. mov edx,(ebx) ! default
  8. sub eax,4(ebx)
  9. cmp eax,8(ebx)
  10. ja 1f
  11. sal eax,2
  12. add ebx,eax
  13. mov ebx,12(ebx)
  14. test ebx,ebx
  15. jnz 2f
  16. 1:
  17. mov ebx,edx
  18. test ebx,ebx
  19. jnz 2f
  20. .extern ECASE
  21. .extern .fat
  22. mov eax,ECASE
  23. push eax
  24. jmp .fat
  25. 2:
  26. jmp ebx