flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Fasm operators priority

Author
Thread Post new topic Reply to topic
edemko



Joined: 18 Jul 2009
Posts: 549
edemko 19 Aug 2010, 13:52
Image
and, or, xor - are they treated as exponential?
shl shr - look to be exponential, but have 1-unit-bigger priority
why not to merge them: people will bore with Tomasz? - every one gets wrong once, i get wrong often, are you afraid?
not - equals 0-value-1, but -/+ have the lowest priority of 0
Tomasz, just name a reason please.
I'm eager creating some integer arithmetic and need fasm-compatibility, help.
How would you range next operators: "() not neg shl shr sal sar rol ror mul imul div idiv mod and or xor + -"
Post 19 Aug 2010, 13:52
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 19 Aug 2010, 14:00
One thing: never ever put unary - at same priority as binary -. I really hate this.

Code:
 mov eax, -1 and 5    
Post 19 Aug 2010, 14:00
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 21 Aug 2010, 17:33
vid wrote:
One thing: never ever put unary - at same priority as binary -. I really hate this.

Your preferences are, of course, the exact opposite of mine. I prefer "-1 and 5" and "0-1 and 5" to mean the same.

As for the priorities of other operators, I don't even remember, where I took them from. I keep them for backward compatibility.

Anyway, since they vary from language to language, I usually use round brackets for anything different than addition+multiplication. Just to be on the safe side.
Post 21 Aug 2010, 17:33
View user's profile Send private message Visit poster's website Reply with quote
guignol



Joined: 06 Dec 2008
Posts: 763
guignol 22 Aug 2010, 06:39
अह विड् is per se verbosely dictative.
Post 22 Aug 2010, 06:39
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko 22 Aug 2010, 08:59
guingol, "This er de la topica" Confused
Noogle knowest not Nepalese.
Post 22 Aug 2010, 08:59
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko 23 Aug 2010, 10:20
guingol, i'm sorry for the flame from my side Sad
Post 23 Aug 2010, 10:20
View user's profile Send private message Reply with quote
idle



Joined: 06 Jan 2011
Posts: 440
Location: Ukraine
idle 21 Jan 2011, 08:47
hi
it's still me but under different name

making the module, several alike topics had been created here and at wasm.ru too(...ideas picking...)
i see no importance in remembering those links as the ones were of research interest making the way here
every time i say all's up, a fix-up appears soon and that seems to be a tradition
this topic was taken as a summarizing because it touches fasm compiler
the work touches some parts of it i'd change, some other questions once raised, not always related to fasm too
having found that macro and the link i wrote all parts for a i386 machine
that would significantly extend fasmcalc

main changes:
i386-code
i387 automatically detected before entering float mode
mmx calculations automatically disabled if no support found
calling simplified

all the developing details, proc bunch, and common user intro is here
i did not produce fasmw's modification - it would be same as in an archive by the link over
that's a pity but no fasmd modification can be done from my side - i do not understand

thanks
Post 21 Jan 2011, 08:47
View user's profile Send private message Reply with quote
idle



Joined: 06 Jan 2011
Posts: 440
Location: Ukraine
idle 21 Jan 2011, 08:54
i'm also asking you opening '\exe\calc.asm' and translating the strings into your language, and putting those here
Post 21 Jan 2011, 08:54
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.