flat assembler
Message board for the users of flat assembler.

Index > Main > FASMINC environment variable

Author
Thread Post new topic Reply to topic
Jin X



Joined: 06 Mar 2004
Posts: 133
Location: Russia
Jin X 19 Mar 2024, 07:02
I want to suggest introducing an additional environment variable: FASMINC.
Variable INCLUDE is one for all languages. It need to be redefined each time (e.g. in BAT file).

Version 1: use FASMINC variable if it's set, otherwise use INCLUDE (in my opinion, this is more logical).
Code:
        mov     edi,[memory_start]
        mov     [include_paths],edi
        mov     esi,fasminc_variable ; modified by Jin X
        push    edi                  ; added by Jin X
        call    get_environment_variable
;-- added by Jin X --;
        pop     eax
        cmp     edi,eax
        jne     skip_include
        mov     esi,include_variable
        call    get_environment_variable
      skip_include:
;--------------------;
        xor     al,al
        stos    byte [edi]    

Version 2: use both variables: %FASMINC%;%INCLUDE%.
Code:
        mov     edi,[memory_start]
        mov     [include_paths],edi
        mov     esi,fasminc_variable ; modified by Jin X
        call    get_environment_variable
;-- added by Jin X --;
        mov     al,';'
        stosb
        mov     esi,include_variable
        call    get_environment_variable
;--------------------;
        xor     al,al
        stos    byte [edi]    

Sources are included (marked with comments "Jin X").

How do you like this idea?


Description:
Download
Filename: fasminc.zip
Filesize: 54.62 KB
Downloaded: 241 Time(s)

Post 19 Mar 2024, 07:02
View user's profile Send private message Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 670
Location: Ukraine
Overclick 19 Mar 2024, 12:22
Why don't you just redefine right includes?
You can make right choice of Includes by your BAT file or use macro to identify command line variable as extra Include. You don't need to modify fasm source for that simple task
Post 19 Mar 2024, 12:22
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.