flat assembler
Message board for the users of flat assembler.

Index > High Level Languages > A compiler for C or C++ with FASM as the target assembler?

Author
Thread Post new topic Reply to topic
Mino



Joined: 14 Jan 2018
Posts: 163
Mino 21 Apr 2018, 17:29
Hello Smile ,
actually, I'd like to know if you knew (or designed) a compiler for a high-level language, preferably C or C++, with FASM as the target assembly language?

That might be interesting.

Thank you, and good day Wink

_________________
The best way to predict the future is to invent it.
Post 21 Apr 2018, 17:29
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20290
Location: In your JS exploiting you and your system
revolution 22 Apr 2018, 00:32
Moved to HLL forum.
Post 22 Apr 2018, 00:32
View user's profile Send private message Visit poster's website Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 671
vivik 22 Apr 2018, 07:37
Some compilers support "intel syntax" generation. Don't know how close it is.
Post 22 Apr 2018, 07:37
View user's profile Send private message Reply with quote
Mino



Joined: 14 Jan 2018
Posts: 163
Mino 22 Apr 2018, 08:46
All assemblers work according to the same principle, so it shouldn't be very different, indeed; however FASM uses macros, "proc" (so process I imagine), preprocessor instructions, segments,...
For example, when I go to this site (https://godbolt.org), a simple little program in C or C++ gives me a code x86-64 according to the gcc compiler; and it still seems quite different from FASM.

_________________
The best way to predict the future is to invent it.
Post 22 Apr 2018, 08:46
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 671
vivik 22 Apr 2018, 08:59
No, no compiler generates assembly with fasm macros. At least I'm not aware of that. They usually use labels and such.
Post 22 Apr 2018, 08:59
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8349
Location: Kraków, Poland
Tomasz Grysztar 22 Apr 2018, 09:59
PureBasic has been using fasm since early 2000's and it is perhaps the most "professional" compiler that uses fasm for this purpose. There were many other smaller ones, but mostly a hobby projects. For example Simple C had been once converted to use fasm.
Post 22 Apr 2018, 09:59
View user's profile Send private message Visit poster's website Reply with quote
Mino



Joined: 14 Jan 2018
Posts: 163
Mino 22 Apr 2018, 10:13
Thanks to you for the information Wink
Post 22 Apr 2018, 10:13
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8349
Location: Kraków, Poland
Tomasz Grysztar 22 Apr 2018, 10:24
You can find a couple more on this very forum, for example Flat C--.
Post 22 Apr 2018, 10:24
View user's profile Send private message Visit poster's website Reply with quote
Mino



Joined: 14 Jan 2018
Posts: 163
Mino 22 Apr 2018, 13:23
Ha! Thank you very much, that's exactly what I expected Very Happy
Post 22 Apr 2018, 13:23
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 23 Apr 2018, 03:53
I'm surprised nobody mentioned yet SmallerC (try "-asm n2f" since NASM is default).
Post 23 Apr 2018, 03:53
View user's profile Send private message Visit poster's website Reply with quote
Mino



Joined: 14 Jan 2018
Posts: 163
Mino 24 Apr 2018, 19:11
Okay thanks to you too Very Happy
Post 24 Apr 2018, 19:11
View user's profile Send private message 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.