flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > ^@^! is allowed as a constant :)

Author
Thread Post new topic Reply to topic
MCD



Joined: 21 Aug 2004
Posts: 604
Location: Germany
MCD
I just noticed a funny think:

any symbols in Fasm can contain the ^ @ or ! character. This can give strange symbols!!! Man o man.


Code:
org 100h
mov ah,9
mov dx,^@^!
int 21h
int 20h
^@^! db "Hello funny World"
    

_________________
MCD - the inevitable return of the Mad Computer Doggy

-||__/
.|+-~
.|| ||
Post 23 Dec 2004, 15:56
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
it's allright, any character that isn't reserved can be part of name. otherwise people couldn't use names containing #255 for exmaple Smile. By the way you can also use "%" when it isn't only char in name (then it is count of times or repeat). Otherwise, you couldn't do things like
%_ fix {
_% fix }
%comon fix common
@ExitProcess = 1
etc.

what's bad about name ^@^!?

(btw: ... noticed funny thinG, not think)
Post 23 Dec 2004, 18:18
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 604
Location: Germany
MCD
nothing.

but take a look at the xor operator "^"
Post 23 Dec 2004, 18:27
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
if there will be some xor operator then this would be surely disabled.

btw, if you don't like it, just search fasm sources for list of reserved symbols and add them all (i am not sure with this but you can try). I am not sure but i thik list was just some string containing reserved chars, but maybe there has to be handler for each, only HE knows Wink
Post 23 Dec 2004, 18:32
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 604
Location: Germany
MCD
Sorry, I meant take a look at the thread "Compiler Internals > Logical xor operator for Fasm needed? With "^" character". What do you think? (Or have you already been there?)
Post 23 Dec 2004, 19:14
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
yep, i voted for it, it shouldn't cause any harm, and you are right it may needed at some times where will old way distort readability of code.

Only problem could be with maniacs who used "^" character in names of their variables Wink
Post 23 Dec 2004, 20:32
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 604
Location: Germany
MCD
I normally don't use such characters in variables/constants, I just wanted to show something :p
Post 23 Dec 2004, 21:04
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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.