Operand size mismatch
- From: "Adem" <adembaba@xxxxxxxxxx>
- Date: 29 Dec 2005 17:21:06 -0700
Hi,
I came across to a recent delphi lib claiming the world.
But, the trouble is, I can not compile it as I keep getting 'Operand Size Mismatch' errors.
There a few routines that this comes up, here is one (I have marked the position)
function _cCharPos_old(const Ch: Char; const S: string; const StartPos: integer = 1): integer; assembler
asm
@@Start: push esi
test S, S; jz @@zero // check S length
mov esi, S.SzLen
cmp StartPos, esi;
jle @@begin
@@zero: xor eax,
eax; jmp @@Stop
@@begin: push S
sub StartPos, esi;
add S, esi
@_Loop:
cmp al, S[StartPos-1]; { <--- ERROR HERE}
je @@found
inc StartPos; jle @_Loop
@@notfound: xor eax, eax;
jmp @@end
@@found: sub S, [esp];
lea eax, S + StartPos
@@end: pop S
@@Stop: pop esi
end;
Could someone correct this.
VTW, my CPU is Opteron on Win2003 Server.
--
Cheers, Adem .
- Follow-Ups:
- Re: Operand size mismatch
- From: Dennis
- Re: Operand size mismatch
- Prev by Date: Re: FastMM 4.56 / D7 / Error message on build with runtime packages
- Next by Date: Re: Operand size mismatch
- Previous by thread: Fastcode PosIEx B&V 1.1.0
- Next by thread: Re: Operand size mismatch
- Index(es):
Relevant Pages
|