flat assembler
Message board for the users of flat assembler.

Index > Main > [FASM preprocessor] how to bridge the two strings?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 12 Dec 2013, 14:44
I want do like this:

Dir EQU "C:\fasm\"
include Dir # "include\win32a.inc"

But fasm compiled error.
How fixed this trouble ?
Sad
Post 12 Dec 2013, 14:44
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 12845
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep 12 Dec 2013, 14:47
have you try checking windows environment variable?
Post 12 Dec 2013, 14:47
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20355
Location: In your JS exploiting you and your system
revolution 12 Dec 2013, 19:12
You will need to use a macro/match block to get the processing order correct.
Code:
Dir EQU "C:\fasm\" 
match x,Dir {include x#"include\win32a.inc" }    
Post 12 Dec 2013, 19:12
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 13 Dec 2013, 14:18
revolution
match not help.
Post 13 Dec 2013, 14:18
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 13 Dec 2013, 14:30
Roman,

Macrooperator # works only inside macroblock (that's the gist of what revolution had said). Show your non-working source (considering that).
Post 13 Dec 2013, 14:30
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 13 Dec 2013, 14:46
A write my code in first post Smile
Code:
Dir EQU "C:\fasm\" 
 include Dir # "include\win32a.inc"    
Post 13 Dec 2013, 14:46
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 13 Dec 2013, 14:52
Roman,

Macrooperator # is not inside macroblock (i.e. { } of sorts).
Post 13 Dec 2013, 14:52
View user's profile Send private message Reply with quote
EaxRax



Joined: 20 Jul 2013
Posts: 15
EaxRax 14 Dec 2013, 00:20
Roman

Я проверил. Всё работает.

Перепиши весь код в точности, который написал revolution, себе в исходник. Пропиши правильный путь, к папке FASM. Убедись, что в папке FASM, есть папка INCLUDE. Если всё сделал правильно, то всё должно заработать.

З.Ы. Прикрепил программу для теста (с папкой FASM) (100% работает). Распакуй в любую директорию и запусти файл Compile.bat, для компиляции.

===================================================================

I checked. Everything works.

Copy all code in accuracy, which wrote by revolution, in your source code. Prescribe the right path to the folder FASM. Make sure that the folder FASM, there is a folder INCLUDE. If you did everything correctly, then it should work.

P.S. Attached to the test program (with a folder FASM) (100% working). Unzip to any directory and run the file Compile.bat, to compile.


Description:
Download
Filename: Test.zip
Filesize: 198.06 KB
Downloaded: 428 Time(s)

Post 14 Dec 2013, 00:20
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 14 Dec 2013, 13:17
EaxRax
На какой версии Fasm-a компилил ?
Post 14 Dec 2013, 13:17
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 14 Dec 2013, 15:57
Roman,

Does it matter? I've tried that approach on every fasm version I posess, from 1.62 (when match directive was introduced). Works as expected.
Post 14 Dec 2013, 15:57
View user's profile Send private message Reply with quote
EaxRax



Joined: 20 Jul 2013
Posts: 15
EaxRax 15 Dec 2013, 00:02
Roman wrote:
EaxRax
На какой версии Fasm-a компилил ?
FASM v1.71.16
Post 15 Dec 2013, 00:02
View user's profile Send private message 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.