Menu

JWASM and MASM32 headers compatiblity?

2009-07-14
2013-04-20
  • Andre Tampubolon

    Here's a code taken from the MASM32 forum:

    .386
    .model flat,stdcall

    include \masm32\include\kernel32.inc
    include \masm32\include\masm32.inc

    includelib \masm32\lib\kernel32.lib
    includelib \masm32\lib\masm32.lib

    .data
    s db "Test",0

    .code
    start:
    lea eax,s
    push eax
    call StdOut
    ret
    end start

    This is the command I used:
    jwasm -IC:\masm32\include -c -coff code.asm

    JWASM 1.95 failed to assemble it:
    \masm32\include\masm32.inc(402): Error! E167: Symbol is already defined: RUN_SYN
    CH_PROCESS_EX
    \masm32\include\masm32.inc(402): Included by
      astro.asm(5): Main line code
    astro.asm: 19 lines, 1 passes, 71 ms, 0 warnings, 1 errors

    Works perfectly on ML v6.14, though.

     
    • Nobody/Anonymous

      > Works perfectly on ML v6.14, though.

      Might be interesting what arguments you used with Masm. Perhaps you used -Cx or -Cp? Because the symbol mentioned in the error message is defined twice in Masm32, first as a structure (RUN_SYNCH_PROCESS_EX ), and second as a prototype (run_synch_process_ex). Since your sample doesn't include a "OPTION CASEMAP:NONE" line, Masm and JWasm will convert all symbols to upper case if neither -Cx nor -Cp is given.

      japheth

       
    • Andre Tampubolon

      This is the argument I used in MASM32:
      ml.exe /I C:\masm32\include /c /coff /Cp code.asm

       
    • Nobody/Anonymous

      So you'll have to give JWasm the /Cp as well.

      japheth

       
      • Andre Tampubolon

        Yes, using -cp, the code compiled well.
        Thanks for the hint.

         

Log in to post a comment.