csb4.s 391 B

1234567891011121314151617181920212223242526272829
  1. .sect .text; .sect .rom; .sect .data; .sect .bss
  2. .define .csb4
  3. .sect .text
  4. .csb4:
  5. !ebx, descriptor address
  6. !eax, index
  7. mov edx,(ebx)
  8. mov ecx,4(ebx)
  9. 1:
  10. add ebx,8
  11. dec ecx
  12. jl 4f
  13. cmp eax,(ebx)
  14. jne 1b
  15. mov ebx,4(ebx)
  16. 2:
  17. test ebx,ebx
  18. jnz 3f
  19. .extern ECASE
  20. .extern .fat
  21. mov eax,ECASE
  22. push eax
  23. jmp .fat
  24. 3:
  25. jmp ebx
  26. 4:
  27. mov ebx,edx
  28. jmp 2b