home *** CD-ROM | disk | FTP | other *** search
- ;******************************************************************************
- ; Filename: STRCHRN.ASM
- ; Author: Peter Andersson
- ; Version: 0.0
- ; Created: 1995.03.12
- ; Updated:
- ;******************************************************************************
- ; Copyright Peter Andersson, 1994-1995.
- ; All rights reserved.
- ;******************************************************************************
- ; Function: PSZ @strchrn(PSZ str,CHAR chr)
- ; Comment: Searches for the next nonmatch of a character in a string
- ; Returns: string position of the first nonmatch
- ;******************************************************************************
-
- Include STDDEF.INC
-
- Codeseg
-
- Proc strchrn ,2
- @@Loop01: Mov Cx,[Eax]
- Cmp Cl,Dl
- Jne @@Next01
- TestZ Cl
- Jz @@Exit01
- Cmp Ch,Dl
- Jne @@Next02
- Add Eax,2
- TestZ Ch
- Jne @@Loop01
- @@Exit01: Clear Eax
- Ret
- Align 4
- @@Next02: Inc Eax
- @@Next01: Ret
- Endp
-
- End