rck.s 314 B

1234567891011121314151617181920
  1. .sect .text; .sect .rom; .sect .data; .sect .bss
  2. .sect .text
  3. .define .rck
  4. ! descriptor address in ebx
  5. ! value in eax, must be left there
  6. .rck:
  7. cmp eax,(ebx)
  8. jl 2f
  9. cmp eax,4(ebx)
  10. jg 2f
  11. ret
  12. 2:
  13. push eax
  14. .extern ERANGE
  15. .extern .error
  16. mov eax,ERANGE
  17. call .error
  18. pop eax
  19. ret