flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > [bug] fasm.exe: predefined labels with embedded spaces

Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20303
Location: In your JS exploiting you and your system
revolution 30 Apr 2016, 05:35
With fasm.exe (console version) trying to define a label with a space from the command line will cause fasm to quit without an error.
Code:
C:\>fasm source.asm -m 1000 -d x=y\ z
flat assembler  version 1.71.51  (1000 kilobytes memory)

C:\>    
It makes no difference if the file "source.asm" exists or not. The label 'x' should be defined to 'y z'.

Using 'define x y z' in the source file will define the label correctly.

Edit: Fixed in version 1.71.52


Last edited by revolution on 28 May 2016, 16:25; edited 1 time in total
Post 30 Apr 2016, 05:35
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20303
Location: In your JS exploiting you and your system
revolution 01 May 2016, 05:20
This appears to be a misplaced jump destination. If we change line 104 in "PREPROCE.INC" it appears to fix the problem:
Code:
        cmp     al,20h
        je      convert_line_data
        cmp     al,3Bh    
Code:
        cmp     al,20h
        je      convert_predefinition ;<---- new destination
        cmp     al,3Bh    
Code:
C:\>fasm source.asm -m 1000 -d x=y\ z
flat assembler  version 1.71.51  (1000 kilobytes memory)
error: source file not found.

C:\>    
And now properly returns an error status. And if the source file exists then it proceeds to assemble as usual with the defined value as specified.
Post 01 May 2016, 05:20
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.