News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

a masm32 bug?

Started by xandaz, November 28, 2020, 02:47:52 AM

Previous topic - Next topic

xandaz

i have this code
         .elseif ax==IDM_CLOSE
            invoke  CloseHandle,hProject
            mov     ecx,noMdiChild
            or      ecx,ecx
            jz      no_close
loop_3:
            push    ecx
            invoke  SendMessage,hMdi,WM_MDIGETACTIVE,0,0
            invoke  SendMessage,hMdi,WM_MDIDESTROY,eax,0
            pop     ecx
            loop    loop_1
no_close:


gives jumo destination too far: by 214 bytes
Can someone explain this?

jj2007


xandaz

   yeah...sorry my bad. the error was pointing to next line.

LordAdef


HSE

Equations in Assembly: SmplMath

hutch--

Guys,

Its worth the effort to ditch very old instructions like LOOP and construct your loop code with CMP/Jxx code. its much faster and has no range limitations. Old code like LOOP are junk dumped into microcode in the CPU and are there purely for backwards compatibility. Any modern code (after 1995) is done better with the lower level CMP/Jxx style of code.