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 > Windows > fasmw.exe is unable to bind .res file to .exe file

Author
Thread Post new topic Reply to topic
yeohhs



Joined: 19 Jan 2004
Posts: 7
Location: Malaysia
fasmw.exe is unable to bind .res file to .exe file
Hi Mr. Grysztar,

Thank you for flat assembler. It is the best. Back in 2009, I was using fasmw.exe 1.71.51. It can bind a .res file to the .exe file.

Today, I downloaded version 1.73.01 and tried using fasmw.exe to build one of my old programs but I find that it is unable to bind the .res file to the .exe file.

After that, I tested using fasm.exe, the command line version, for both 1.71.51 and 1.73.01 and found that both are able to bind my .res file to the .exe.

I've attached a zip that contains two minimal files, one .asm and one .res.

Thanks and best regards,
Yeoh


Description:
Download
Filename: win32dlg.zip
Filesize: 4.71 KB
Downloaded: 13 Time(s)

Post 05 Dec 2017, 13:53
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6677
Location: Kraków, Poland
It seems there is a tiny bug in the fasmw's lseek interface that causes this problem, that's why it does not show up with console fasm.

I have fixed it and updated the fasmw interface version to 0.98.05. The new version is available both in the updated 1.72 and 1.73.01 releases.
Post 05 Dec 2017, 15:56
View user's profile Send private message Visit poster's website Reply with quote
yeohhs



Joined: 19 Jan 2004
Posts: 7
Location: Malaysia
Thank you very much.
Post 05 Dec 2017, 23:21
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 15312
Location: Bigweld Industries

Tomasz Grysztar wrote:
It seems there is a tiny bug in the fasmw's lseek interface that causes this problem, that's why it does not show up with console fasm.

I have fixed it and updated the fasmw interface version to 0.98.05. The new version is available both in the updated 1.72 and 1.73.01 releases.

Erm ... the console version doesn't set the carry flag to any particular value, so it simply uses the carry flag returned by the API SetFilePointer, which is undefined in the API spec.
Post 06 Dec 2017, 03:52
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6677
Location: Kraków, Poland
Thank you, I did not take a look at the one that was working. Wink


Last edited by Tomasz Grysztar on 06 Dec 2017, 11:19; edited 1 time in total
Post 06 Dec 2017, 10:42
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: 15312
Location: Bigweld Industries
You can use CMC after the CMP to set the flag accordingly. No need for any Jcc instructions.

Code:
;...
call [SetFilePointer]
cmp eax,-1
cmc
ret

Post 06 Dec 2017, 10:55
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6677
Location: Kraków, Poland
I prefer the traditional version, even though it being clearer is probably not a believable reason in case of fasm 1 sources. Wink
Post 06 Dec 2017, 11:00
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: 15312
Location: Bigweld Industries

Tomasz Grysztar wrote:
... even though it being clearer is probably not a believable reason in case of fasm 1 sources. Wink

Hehe Laughing
Post 06 Dec 2017, 11: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.