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%  [ 15 ]
no need, thanks  11%  [ 3 ]
no, this would anticipate with Fasms concepts  0%  [ 0 ]
let Privalov decide it alone  25%  [ 7 ]
don't know  3%  [ 1 ]
something else  3%  [ 1 ]

Author
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 ^
mov eax,0ffffffffh
no?

me i vote yes

xor mnenonic is not a real torture for me
09 Oct 2007, 00:50
LocoDelAssembly

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".
09 Oct 2007, 15:25
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: 2008 Time(s)

13 Oct 2007, 12:38
LocoDelAssembly

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

Anyway this topic isn't worth discussing anymore since obviously it will not be implemented. Not in official fasm at least.
13 Oct 2007, 15:59
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!
17 Oct 2007, 00:10
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

 Jump to: Select a forum Official----------------AssemblyPeripheria General----------------MainTutorials and ExamplesDOSWindowsLinuxUnixMenuetOS Specific----------------MacroinstructionsOS ConstructionIDE DevelopmentProjects and IdeasNon-x86 architecturesHigh Level LanguagesProgramming Language DesignCompiler Internals Other----------------FeedbackHeapTest Area
Goto page Previous  1, 2

Forum Rules:
 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum