News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Make procedure

Started by shekel, May 23, 2015, 12:51:36 PM

Previous topic - Next topic

jj2007

Quote from: rrr314159 on May 29, 2015, 02:57:44 AMUnfortunately it doesn't help the cause when asking people to switch to JWasm: legal ML code can explode! Wonder how many of these little "gotchas" there are? And imagine chasing down a bug like that in a prog with thousands of lines - they'd definitely go back to ML

Going back to ML is not a good option; an unbalanced stack means the coder has lost control (unless he did it on purpose). Worst case is someproc uses esi edi ebx arg1, arg2 - you are trying to preserve non-volatile regs but you are getting back garbage - and it may take a long time until that actually produces a fat problem, usually on the client's premises :icon_mrgreen:

P.S.: Gotchas

rrr314159

Of course the coder may have done it on purpose. In fact I do something like this in my "invoke macros". There I'm explicitly "leave"ing but if I'd known this about ML, I might conceivably have used their proc. If so, then years later I tried to switch to JWasm and it blew up ... I'm thinking of a case like that, where somebody tries his large ML prog under JWasm (because, for instance somebody like me recommends it) and it blows up for this reason. He's not going to want to chase that down (he did it years ago, and doesn't even know what the problem is anyway).

It occurs to me that one of the switches -Zm, -Zne, -Zv8 might force compatibility on this issue, don't have time to check it. But I'd say this is the sort of thing one of those switches should do: restore the (presumably) inferior ML way if coder wants it.

Some of those "gotchas" u link to are in fact gotchas, not all. Whenever a "problem" is "fixed" such that the improved JWasm won't run the old code, that's a gotcha. Again, that's (I bet) what those Z switches are for.

BTW .. there's 2 d**n much religion on this board! There's the liberal religion, the MACRO religion, atheism religion, Bertrand Russell religion, C/C++ religion ... pls don't start with the JWasm religion too! It's a great prog, best in the world, all other progs should not even be called prog's by comparison; Oh great J, mother of all perfection ... :biggrin:
I am NaN ;)

jj2007

Quote from: rrr314159 on May 29, 2015, 04:15:40 AMpls don't start with the JWasm religion too! It's a great prog, best in the world, all other progs should not even be called prog's by comparison; Oh great J, mother of all perfection ... :biggrin:

It's difficult to ignore it. While ML 6.14 is supplied with Masm32, it is too outdated for serious use. Higher versions are difficult to find and/or to install, and then there is always the license issue.

Today I found a new incompatibility between ML and J, in my ternary operator function macro. The fix will be online soon. It has become much better over time, but I still need fixes for this kind of problem. Nowadays J has become easier to use than ML, but still, I make sure that all MB macros must work with ML 6.15 ... 10 and JWasm.