strlen.inc 856 B

12345678910111213141516171819202122232425262728293031323334
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 by the Free Pascal development team
  5. Processor specific implementation of strlen
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. asm
  13. movl p,%edi
  14. movl $0xffffffff,%ecx
  15. xorl %eax,%eax
  16. cld
  17. repne
  18. scasb
  19. movl $0xfffffffe,%eax
  20. subl %ecx,%eax
  21. end ['EDI','ECX','EAX'];
  22. {
  23. $Log$
  24. Revision 1.3 2002-09-07 16:01:19 peter
  25. * old logs removed and tabs fixed
  26. }