flat assembler
Message board for the users of flat assembler.

Index > Main > understand if macro

Author
Thread Post new topic Reply to topic
sleepsleep



Joined: 05 Oct 2006
Posts: 9133
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
was trying to do the following

Code:
if eax < 1000
       invoke ExitProcess,0
end if
    


received
Code:
                if eax < 1000
error: invalid value.
    
Post 06 Feb 2008, 14:46
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6038
Location: Poland
MHajduk
First, you should be sure that you include 'IF.INC' file (placed in '\INCLUDE\MACRO' directory).

Second, you should rather write
Code:
.if eax < 1000
        invoke ExitProcess,0 
.endif     
    


Last edited by MHajduk on 06 Feb 2008, 15:03; edited 1 time in total
Post 06 Feb 2008, 15:03
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17671
Location: In your JS exploiting you and your system
revolution
i think you mean ".if"
Code:
.if eax < 1000
       invoke ExitProcess,0
.endif    
Post 06 Feb 2008, 15:03
View user's profile Send private message Visit poster's website Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 9133
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
but if u guys check the manual, it uses "end if" with a space?
Post 06 Feb 2008, 15:20
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6038
Location: Poland
MHajduk
"If" and "end if" are for conditional assembly (some sources are compiled or not regarding of some condition).
Post 06 Feb 2008, 15:22
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
You have to use it as http://flatassembler.net/docs.php?article=win32 , not as documented for the assembler that as MHajduk said it is for assemble-time purposes and not for run-time purposes.
Post 06 Feb 2008, 15:37
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 9133
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
thanks all Smile

why we all seem to have fun manipulating all the bits ? Smile
Post 06 Feb 2008, 16:22
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.