flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Misbehavior or feature?

Author
Thread Post new topic Reply to topic
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Well, I think it is a misbehavior. Here is an example. There are four files in the example:
Code:
; in the file '/Main.asm' :

include '/A/A1.inc'
include '/B/B1.asm'

;----------------------------------------------------
; in the file '/A/A1.inc' :

macro GetFile name {
  file name
}

;-----------------------------------------------------
; in the file '/B/B1.asm' :

; The file 'MyFile.xxx' full path is '/B/MyFile.xxx'

GetFile 'MyFile.xxx'  ; fails because of discussed misbehavior, 
; FASM computes the path, relatively to the macro definition, 
; instead of macro invocation.

GetFile '../B/MyFile.xxx' ; works - relative to the macro definition IMHO wrong.
GetFile 'B/MyFile.xxx' ; also works - relative to the main file as described in the manual.

;----------------------------------------------------    
Post 17 Dec 2011, 17:09
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7797
Location: Kraków, Poland
Tomasz Grysztar
Seems to be a bug... I will look into it in a spare time.
Post 19 Dec 2011, 22:10
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7797
Location: Kraków, Poland
Tomasz Grysztar
I corrected it in 1.69.52, as a part of unifying the behavior of FILE with INCLUDE directive.
Post 15 Apr 2012, 09:25
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.