flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > [flaw]checking if arg is empty

Author
Thread Post new topic Reply to topic
roxaz



Joined: 27 Jul 2008
Posts: 25
roxaz
im not even sure that we could call it a bug, so i marked thread as [flaw].
see how we must check if lSize is empty.
Code:
macro va_end ap*, lSize
{
    mov esp, ap
 if lSize eq
 else if
        add esp, lSize
   end if
      xor ap, ap
}    

it would look much better if it worked like this:
Code:
macro va_end ap*, lSize
{
       mov esp, ap
 if lSize neq
           add esp, lSize
   end if
      xor ap, ap
}    

i cant think of a reason why eq works and neq shouldnt work here...
Post 27 Jul 2008, 11:39
View user's profile Send private message Reply with quote
Kenneth



Joined: 16 Nov 2005
Posts: 38
Location: United States of America
Kenneth
Code:
macro va_end ap*, lSize
{ 
        mov esp, ap 
        if ~ lSize eq
           add esp, lSize
        end if 
        xor ap, ap 
}       


?
Post 27 Jul 2008, 13:16
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
roxaz



Joined: 27 Jul 2008
Posts: 25
roxaz
heh.. yeah.. damn it
Post 27 Jul 2008, 17:11
View user's profile Send private message Reply with quote
rCX



Joined: 29 Jul 2007
Posts: 166
Location: Maryland, USA
rCX
Code:
if lSize neq
    


I don't think neq or neqtype would be bad ideas for fasm considering that many things in asm use "n" to denote not. e.g. jne, loopne...
Post 27 Jul 2008, 22:41
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 GitHub, YouTube, Twitter.

Website powered by rwasa.