error A2075: jump destination too far : by 20 byte(s)

error line pointed by MASM: last line


xor ecx, ecx
mov ecx, 3
push esi
xor esi, esi
label2::
mov i, esi

mov temp1, 3
fld temp1 ; 3
fld i ; i, 3
fdivp ST(1), ST(0) ; i/3
fld cxClient ; cxClient, i/3
fmulp ST(1), ST(0) ; cxClient*(i/3)
fstp temp1 ; temp1 = ST(0), FPU stack balanced

mov temp2, 4
fld temp2 ; 4
fld1 ; 1, 4
fdivp ST(1), ST(0) ; 1/4
fld cxClient ; cxClient, 1/4
fmulp ST(1), ST(0) ; cxClient*(1/4)
fstp temp2 ; temp2 = ST(0), FPU stack balanced

mov temp3, 7
fld temp3 ; 7
fld1 ; 1, 7
fdivp ST(1), ST(0) ; 1/7
fld cxClient ; cxClient, 1/7
fmulp ST(1), ST(0) ; cxClient*(1/7)
fstp temp3 ; temp3 = ST(0), FPU stack balanced

invoke MoveWindow, , temp1, 0, temp2, temp3, TRUE
inc esi
loop label2
pop esi
Posted on 2006-08-20 04:30:23 by w0lfshad3
How would this be fixed?

...alltough i fixed it by moving the looping redundant temp2 and temp3 code before the loop.
Posted on 2006-08-20 04:33:55 by w0lfshad3
loop instruction if I am not mistaken is limited by -128...+127 offset range and also very slow. You could instead just decrement the ecx register, and do a jnz.
Posted on 2006-08-20 05:03:12 by arafel
arafel, you are correct.  ;)
Posted on 2006-08-20 05:58:01 by roticv