Compiling with JWasm instead of Masm


The Masm version of Easy Code uses the Microsoft Masm compiler (ml.exe, included in Masm32) by default. However, the compatible Watcom compiler (JWasm.exe) can also be used for assembling source code. To do so, just replace the path to the Compiler (in the Compile / Link tab of the Tools->Settings menu) with the path pointing to JWasm.exe file.


IMPORTANT: When calling the wsprintf API function, remember that ml.exe corrects the stack pointer by properly increasing the Esp register after the call (only if called with Invoke). However, JWasm.exe never does this correction, so when using JWasm.exe to compile source code, you will have to manually increase Esp after each call to wsprintf (Add Esp, xx) for the built application to work properly. The xx value will depend on the number of parameters passed to wsprintf (four bytes for each parameter).