News:

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

Main Menu

JWAsm & JWLink command lines & Options

Started by Grincheux, January 25, 2016, 01:55:58 AM

Previous topic - Next topic

Grincheux

Quote;RELEASE : jwasm -coff -Fd -Fw=PrjJWAsm.err -Gz -zlc -zld -zlf -zlp -zls "PrjJWAsm.asm"
;RELEASE : jwlink OPTION CHECKSUM,ELIMINATE,MAP,NORELOCS,NXCOMPAT,FILLCHAR=42 RESOURCE PrjJWAsm.res FORMAT WINDOWS PE FILE PrjJWAsm.obj

;DEBUG jwasm -Zd -Zi -coff -Fd -Fw=PrjJWAsm.err -Gz -zlc -zld -zlf -zlp -zls "PrjJWAsm.asm"
;DEBUG jwlink OPTION CHECKSUM,ELIMINATE,MAP,NORELOCS,NXCOMPAT,FILLCHAR=42 RESOURCE PrjJWAsm.res FORMAT WINDOWS PE FILE PrjJWAsm.obj

;*** a simple GUI app using WinInc include files
;*** this sample creates a window and a message loop

        .686P
        .model flat, stdcall
        option casemap:none
        option PROCALIGN:16
;      OPTION DLLIMPORT:<user32.lib>
;      OPTION DLLIMPORT:<kernel32.lib>
;      OPTION DLLIMPORT:<gdi32.lib>

INCLUDELIB C:\masm32\LIB\user32.lib
INCLUDELIB C:\masm32\LIB\kernel32.lib
INCLUDELIB C:\masm32\LIB\gdi32.lib

WINVER              equ 0501h
WIN32_LEAN_AND_MEAN equ 1

        .nolist
        .nocref
        include windows.inc
        .list
        .cref

I would like to know how :

-Fd and option IMPLIB works together.
   When I sepcify -Fd I must include the libraries, strange! My symbols are undefined.

-OPTION DLLIMPORT
It the way the code is created with or without this option.
If I remove it the code doesnot change!

QuoteCode Generation Effects
The effects of setting this options are subtle and useful only for MS Windows applications: if the function described by the prototype is called via INVOKE, slightly more efficient code than normal is generated, because the function's address in the IAT is used. Example:
INVOKE GetModuleHandle, NULL
code generation with OPTION DLLIMPORT:

        push NULL
        call DWORD PTR [_imp__GetModuleHandle@4]

code generation without OPTION DLLIMPORT:

        push NULL
        call _GetModuleHandle@4
        ...
    _GetModuleHandle@4:
        jmp DWORD PTR [_imp__GetModuleHandle@4]  ;stub added by the linker
Kenavo (Bye)
----------------------
Help me if you can, I'm feeling down...