flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Main > [fasmg] push 0xFFFFFFFF ; 5 bytes in FASMG, 2 bytes in FASM1

Author
Thread Post new topic Reply to topic
VEG



Joined: 06 Feb 2013
Posts: 51
Location: Minsk, Belarus
[fasmg] push 0xFFFFFFFF ; 5 bytes in FASMG, 2 bytes in FASM1
I'm attempting to move a project to FASMG, and I'm trying to achieve identical output as it was with current version of my project with the FASM1 to ensure that everything is ok with my new macros. So, I will definitely see any differences in the output of the standard x86 instructions.

The first difference I've encountered that "push -1" is not the same as "push 0xFFFFFFFF" anymore. Any particular reason or it wasn't planned?
Post 05 May 2017, 18:51
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6310
Location: Kraków, Poland
No, this was not an intended change. I'm going to correct it.
Post 05 May 2017, 19:48
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6310
Location: Kraków, Poland
I have uploaded the corrections. Please test them.
Post 05 May 2017, 20:18
View user's profile Send private message Visit poster's website Reply with quote
VEG



Joined: 06 Feb 2013
Posts: 51
Location: Minsk, Belarus
It seems that it works. Thank you. I'll continue porting of my project. If I'll find some other controversial differences, I'll write about them here.
Post 05 May 2017, 20:24
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6310
Location: Kraków, Poland

VEG wrote:
It seems that it works. Thank you. I'll continue porting of my project. If I'll find some other controversial differences, I'll write about them here.

Thank you. These macros have not yet been tested much, as very few people tried using them.
Post 05 May 2017, 20:27
View user's profile Send private message Visit poster's website Reply with quote
VEG



Joined: 06 Feb 2013
Posts: 51
Location: Minsk, Belarus
Another controversial difference:

Code:
include 'p6.inc'
use32
push 0.0

Also 5 bytes instead of 2 in the FASMG. 0.0 always equals to 0 in binary form. So, 2-byte instruction is possible here.

I think it is better to check how float looks like when it is treated as a dword. For example, 0x00000001 equals to 1.4E-45, so "push 1.4E-45" also can take just 2 bytes.
Post 05 May 2017, 21:02
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6310
Location: Kraków, Poland

VEG wrote:
I think it is better to check how float looks like when it is treated as a dword. For example, 0x00000001 equals to 1.4E-45, so "push 1.4E-45" also can take just 2 bytes.

I was not sure if I wanted this feature in the basic set of macros, but after all it is not that complex in implementation, so I added it now.
Post 06 May 2017, 09:09
View user's profile Send private message Visit poster's website Reply with quote
VEG



Joined: 06 Feb 2013
Posts: 51
Location: Minsk, Belarus
Thank you very much. I think that it is better when default set of macros for x86 will generate as compact machine code as possible.
Post 06 May 2017, 10:03
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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.