flat assembler
Message board for the users of flat assembler.

Index > Main > inc workaround

Author
Thread Post new topic Reply to topic
AE



Joined: 07 Apr 2022
Posts: 72
AE 06 Feb 2025, 23:49
There are several questions about inc files.
1. If there were no functions in the file (For example SetWindowLongPtrA/W in USER32.INC) I had to added them to the original .inc
2. If I want to call the function RtlZeroMemory from ntdll I had to comment it out in the KERNEL32.INCs to avoid compiler errors

Question: Is it possible to avoid changing the original distribution files so that when updating fasm I don’t have to make these edits every time?

And one more off topic clarification:
The .inc files from https://github.com/tgrysztar/fasmg sometimes differ significantly from their counterparts in the official distribution (fasmg\examples\x86\include)
As far as I understand, the files on GitHub are simply newer and I can safely use them instead of the originals (and later these updates will be included in the release I guess).
Is that correct?
Post 06 Feb 2025, 23:49
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4161
Location: vpcmpistri
bitRAKE 07 Feb 2025, 05:04
AE wrote:
Question: Is it possible to avoid changing the original distribution files so that when updating fasm I don’t have to make these edits every time?
There has been many attempts at updating the include files. The simplest way is to curate your own Windows support and modify the INCLUDE environment variable to specify the search order - files in earlier paths will shadow those later.

Matt's includes are probably the most comprehensive set I've seen on the board. Finding a working download is challenging - I've just contested the Google Drive download (again). Google thinks it's suspicious.

Microsoft even struggles with Win32 programming language projections. I've done some work on translating the metadata. My windows development is primarily the leading edge of 64-bit. Additionally, I have a style of coding that isn't common or compatible. So, my includes aren't useful in a general way.

Many other's have put work into include sets: ProMiNick, ... hopefully they'll comment on their ongoing work, or perhaps search the board.

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 07 Feb 2025, 05:04
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: 20517
Location: In your JS exploiting you and your system
revolution 07 Feb 2025, 05:18
IMO keeping a local version of your own includes in a better option.

A convenient way to manage updates is to use a SCM. Git and Fossil are both free and open source,
Post 07 Feb 2025, 05:18
View user's profile Send private message Visit poster's website Reply with quote
AE



Joined: 07 Apr 2022
Posts: 72
AE 07 Feb 2025, 18:18
Thank you!
As far as I understand, the optimal solution would be to create your own separate independent INCLUDE folder with inc files (for example, dynamically generated by the dll2inc utility) and place it first in the "include" envvar.

And what about the question about the github repository, is this an official, more up-to-date version, or a specialized independent project?

BTW Are there any more up-to-date tools (than the old python script here on the forum) to convert Windows SDK header files for fasm (I especially interested in converting WDK structures)
Post 07 Feb 2025, 18:18
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4161
Location: vpcmpistri
bitRAKE 07 Feb 2025, 18:47
The problem with broad Windows support is multi-faceted (as you might know). Not just the 32/64-bit duality, but A/W string (triality Smile) and then throughout the branches of the Windows versions - a real mess.
AE wrote:
And what about the question about the github repository, is this an official, more up-to-date version, or a specialized independent project?
Tomasz Grysztar's uses the Fossil repo for development and then forwards to the github as needed. fasmg's Windows support is largely focused on its need with some additional compatibility with fasm, afaict.

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 07 Feb 2025, 18:47
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 07 Feb 2025, 19:09
bitRAKE wrote:
fasmg's Windows support is largely focused on its need with some additional compatibility with fasm, afaict.
The fasm compatibility package for fasmg is no longer developed, although I still push some small fixes from time to time. But my focus moved entirely to fasm 2, which provides even more compatibility and more options.

As for the basic x86 encoder that comes with fasmg's core distribution (mirrored at https://github.com/tgrysztar/fasmg/tree/master/core/), it is the simplest implementation, intended to serve as an example of implemeting a complex instruction set, and also capable of providing fasmg's self-hosting. This simpler version is faster than x86-2, so you might prefer to use it if you want quicker assembly - although you might be better off with fasm 1 then, anyway.

That's why there are three different official x86 packages for fasmg. But only one, fasm2, I plan to develop further.
Post 07 Feb 2025, 19:09
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.