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 27 Jul 2008, 11:39
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 27 Jul 2008, 13:16
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 27 Jul 2008, 17:11
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: 172
Location: Maryland, USA
rCX 27 Jul 2008, 22:41
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.