strlen.inc 966 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. var
  13. saveedi : longint;
  14. asm
  15. movl %edi,saveedi
  16. movl p,%edi
  17. movl $0xffffffff,%ecx
  18. xorl %eax,%eax
  19. cld
  20. repne
  21. scasb
  22. movl $0xfffffffe,%eax
  23. subl %ecx,%eax
  24. movl saveedi,%edi
  25. end;
  26. {
  27. $Log$
  28. Revision 1.4 2003-09-08 18:21:37 peter
  29. * save edi,esi,ebx
  30. Revision 1.3 2002/09/07 16:01:19 peter
  31. * old logs removed and tabs fixed
  32. }