flat assembler
Message board for the users of flat assembler.

Index > Main > FASM Equivilant to =,<>,<=,>=?

Author
Thread Post new topic Reply to topic
Killswitch



Joined: 21 Jan 2006
Posts: 20
Killswitch 21 Jan 2006, 23:44
I'm currently on the way to producing a expression to FASM program, I've managed to get +,-,*,/ operators producing some nice FASM code, but I don't know how to convert the following operators: =,<>.<= and >=. Could someone explain this to me, preferably with a floats example to!

Thanks,

Killswitch
Post 21 Jan 2006, 23:44
View user's profile Send private message Reply with quote
RedGhost



Joined: 18 May 2005
Posts: 443
Location: BC, Canada
RedGhost 21 Jan 2006, 23:51
Killswitch wrote:
I'm currently on the way to producing a expression to FASM program, I've managed to get +,-,*,/ operators producing some nice FASM code, but I don't know how to convert the following operators: =,<>.<= and >=. Could someone explain this to me, preferably with a floats example to!

Thanks,

Killswitch



=, equal
<>, not equal (less than or greater than, pascal syntax i think)
<=, less than or equal
>=, greater than or equal

_________________
redghost.ca
Post 21 Jan 2006, 23:51
View user's profile Send private message AIM Address MSN Messenger Reply with quote
Killswitch



Joined: 21 Jan 2006
Posts: 20
Killswitch 21 Jan 2006, 23:59
Lol, sorry I wasn't clear! I meant the FASM equivilant of those operators. For exampe + is:

Add a,b

What's the instruction for those operators?
Post 21 Jan 2006, 23:59
View user's profile Send private message Reply with quote
RedGhost



Joined: 18 May 2005
Posts: 443
Location: BC, Canada
RedGhost 22 Jan 2006, 00:02
cmp x, y

=, je
<>, jne
<=, jle
>=, jge

_________________
redghost.ca
Post 22 Jan 2006, 00:02
View user's profile Send private message AIM Address MSN Messenger Reply with quote
Killswitch



Joined: 21 Jan 2006
Posts: 20
Killswitch 22 Jan 2006, 00:05
Sorry to be a pain, but can you give me a specific example on how to use this - I get an error when I try to use any of those commands, the operators are invalid apperantly. Aren't they jump instructuons?
Post 22 Jan 2006, 00:05
View user's profile Send private message Reply with quote
silkodyssey



Joined: 02 Oct 2003
Posts: 198
Location: St.Vincent & the Grenadines
silkodyssey 22 Jan 2006, 02:37
I think you will find this tutorial helpful. It uses nasm but nasm's syntax is similar to fasm's.

http://www.drpaulcarter.com/pcasm/

_________________
silkodyssey
Post 22 Jan 2006, 02:37
View user's profile Send private message MSN Messenger Reply with quote
Killswitch



Joined: 21 Jan 2006
Posts: 20
Killswitch 22 Jan 2006, 12:03
Thanks!
Post 22 Jan 2006, 12:03
View user's profile Send private message Reply with quote
El_Choni



Joined: 09 Mar 2004
Posts: 8
Location: Spain
El_Choni 23 Jan 2006, 14:36
Code:
cmp dword [v_variable], eax ; compare v_variable with the value in eax.
    


And, then, jump to the adequate label:

Code:
je .equal_to                  ; Jump if v_variable is equal to eax, etc.
jne .unequal_to
jg .greater_than              ; for signed numbers 
jl .less_than                 ; for signed numbers
ja .above                     ; for unsigned numbers
jb .below                     ; for unsigned numbers
jge .greater_than_or_equal_to ; for signed numbers
jle .less_than_or_equal_to    ; for signed numbers
jae .above_or_equal           ; for unsigned numbers
jbe .below_or_equal           ; for unsigned numbers
    
Post 23 Jan 2006, 14:36
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 23 Jan 2006, 14:45
You may also find the table 2.1 useful.
Post 23 Jan 2006, 14:45
View user's profile Send private message Visit poster's website Reply with quote
lilljocke



Joined: 28 Dec 2004
Posts: 34
Location: Sweden
lilljocke 01 Feb 2006, 16:46
How do i compile an exe to my Pocket PC with Windows Mobile 2003 ? is it possible with this tool or is there any other compilers?
Post 01 Feb 2006, 16:46
View user's profile Send private message Visit poster's website 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.