function MyGetPos(const aSour:string;const aChar:Char):integer; function GetPos(aSour:PChar;aChar:Char;aLen:Integer):Integer; assembler; asm push ebp push esi push edi mov ebp,esp mov esi,eax mov edi,1 @S: mov al,[esi] cmp al,dl je @Find inc esi inc edi loop @S @Find: mov eax,edi mov esp,ebp pop edi pop esi pop ebp end; begin Result := GetPos(PChar(aSour),aChar,Length(aSour)); end;