flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Logical xor operator for Fasm needed? With "^" cha

Goto page Previous  1, 2

Should a logical xor operator be added to Fasm? "^"
yes
55%
 55%  [ 15 ]
no need, thanks
11%
 11%  [ 3 ]
no, this would anticipate with Fasms concepts
0%
 0%  [ 0 ]
let Privalov decide it alone
25%
 25%  [ 7 ]
don't know
3%
 3%  [ 1 ]
something else
3%
 3%  [ 1 ]
Total Votes : 27

Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4240
Location: 2018
edfed
sorry but ^ symbol is "at the power of" no?

mov eax,2^32-1 can be a good usage of ^
instead of
mov eax,0ffffffffh
no?

me i vote yes







xor mnenonic is not a real torture for me
Post 09 Oct 2007, 00:50
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
http://en.wikipedia.org/wiki/Operators_in_C_and_C++

But yes, the same symbol is used to denote "at the power of".

The problem with XOR, is that it works with numerical operators, you can't do "(a = 5) xor (b = 7)", but the hypotethical "(a = 5) ^ (b = 7)" would work.

MCD's proposal was to add logical XOR, not numerical, using the same symbol that in C performs numerical XOR.

As an example of usage of this symbol, the "if (~defined theXorParty.multipleUses & setup eq) | (defined theXorParty.multipleUses & ~setup eq)" that you can find on this thread, could be written as "if defined theXorParty.multipleUses ^ setup eq".
Post 09 Oct 2007, 15:25
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4240
Location: 2018
edfed
in electronics, xor is a cross in a circle +O
and is a dot .
or is a plus +

so why do you all want use the ^ symbol?

if this symbol is implemented in fasm, i hope it will be only for power of

the xor symbol can be % or #

but not ^
# because it shows the windowing of the xor function


and i don't code in C
i have a headake with the other languages than asm
the number of operators and mnemonics size are too much shity for me


Description:
Filesize: 28.79 KB
Viewed: 2005 Time(s)

xortruthtable.JPG


Post 13 Oct 2007, 12:38
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Code:
the xor symbol can be % or #    

Those are used already.

Anyway this topic isn't worth discussing anymore since obviously it will not be implemented. Not in official fasm at least.
Post 13 Oct 2007, 15:59
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4240
Location: 2018
edfed
i don't use them in fasm
never
so for me it's ok for %,#,§ or °
just "xor" is a simple solution cause it's explicit and it works!
Post 17 Oct 2007, 00: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:  
Goto page Previous  1, 2

< 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.