flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Compiler Internals > (fasmg) invalid identifier

Author
Thread Post new topic Reply to topic
Mike Gonta



Joined: 26 Dec 2010
Posts: 193
(fasmg) invalid identifier

Code:
include '8086.inc'
        org     100h
display_text = 9
hello_asm:
        mov     ah,display_text
        mov     dx,.1
        int     21h
        int     20h
.1 db 'Hello world!',24h

The use of doted numbers as labels is very popular (at least with me).
Even (for example) hello_asm.1 is an invalid identifier

_________________
Mike Gonta
look and see - many look but few see

http://mikegonta.com
Post 07 Apr 2017, 10:19
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6518
Location: Kraków, Poland
In fasmg "." is no longer a part of label, it is a special character that here indicates that symbol is going to be defined in the "hello_asm" namespace. Because it is not allowed to have a symbol with name "1", this results in error. This is something that is a consequence of fasmg having namespaces and it cannot be easily altered in this architecture.
Post 07 Apr 2017, 10:23
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6518
Location: Kraków, Poland
As a side note: even in fasm 1 such labels were a bit non-standard (I would personally avoid them), as before version 1.52 a symbol like ".1" was interpreted as a floating-point number.
Post 07 Apr 2017, 18:23
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6518
Location: Kraków, Poland
With the new releases of fasmg the identifier requirements are relaxed, numeric names are now allowed after the dot operator. The above source now assembles with no changes.

I'm sorry this took so long, I needed to re-consider the idea several times before I realized that this shouldn't hurt anything.
Post 03 Sep 2017, 20:10
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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.