home *** CD-ROM | disk | FTP | other *** search
/ BURKS 2 / BURKS_AUG97.ISO / BURKS / SOFTWARE / LIBS / PMC101.ZIP / LIBSRC.ZIP / STRCHR.ASM (.txt) < prev    next >
Assembly Source File  |  1994-06-13  |  528b  |  38 lines

  1. .386p
  2. locals
  3.  
  4. public  STRCHR
  5.  
  6. _TEXT           segment byte public use32 'CODE'
  7. assume  cs:_TEXT
  8.  
  9. STRCHR:
  10.         push edi
  11.         cld
  12.  
  13.         mov edi,[esp+4+4+04h]
  14.         mov edx,edi
  15.         or ecx,-1
  16.         xor al,al
  17.         repne scasb
  18.         not ecx
  19.  
  20.         mov edi,edx
  21.         mov al,[esp+4+4+00h]
  22.         repne scasb
  23.         jne short @@01
  24.  
  25.         lea eax,[edi-1]
  26.         jmp short @@00
  27.  
  28. @@01:
  29.         xor eax,eax
  30.  
  31. @@00:
  32.         pop edi
  33.         ret 08h
  34.  
  35. _TEXT           ends
  36. end
  37.  
  38.