flat assembler
Message board for the users of flat assembler.

Index > 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: 80
VEG 05 May 2017, 18:51
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



Joined: 16 Jun 2003
Posts: 8367
Location: Kraków, Poland
Tomasz Grysztar 05 May 2017, 19:48
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



Joined: 16 Jun 2003
Posts: 8367
Location: Kraków, Poland
Tomasz Grysztar 05 May 2017, 20:18
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: 80
VEG 05 May 2017, 20:24
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



Joined: 16 Jun 2003
Posts: 8367
Location: Kraków, Poland
Tomasz Grysztar 05 May 2017, 20:27
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: 80
VEG 05 May 2017, 21:02
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



Joined: 16 Jun 2003
Posts: 8367
Location: Kraków, Poland
Tomasz Grysztar 06 May 2017, 09:09
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: 80
VEG 06 May 2017, 10:03
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


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.