flat assembler
Message board for the users of flat assembler.
Index
> Projects and Ideas > C++ Compiler in assembly |
Author |
|
revolution 18 Jun 2018, 08:40
There might be one somewhere but it is doubtful. Most C++ programmers would like their compiler to be able to compiler itself. And it would also lose the advantage of cross-platform-ness.
But what you could do is take an existing C++ compiler and capture the assembly output of it compiling itself. Then you wold have an assembly version of a C++ compiler. The output would likely be quite ugly from a readability POV. |
|||
18 Jun 2018, 08:40 |
|
connor 08 Jul 2018, 05:07
"take an existing C++ compiler and capture the assembly output of it compiling itself"
How do I set that up & with what? ;I want to try it in windows. and save the output as an asm. |
|||
08 Jul 2018, 05:07 |
|
ManOfSteel 08 Jul 2018, 09:04
Compilers first generate a low-level version of the code before assembling it into the final product. Some compilers provide a switch for that. GCC and Clang have the -S switch (cc -S test.c -o test for the default AT&T syntax or cc -S -mllvm --x86-asm-syntax=intel test.c -o test (-masm=intel for GCC) if you prefer Intel syntax).
Of course don't expect the output code to look very pretty. I'm not sure this method will be useful at all with such beasts as modern high-level compilers though. |
|||
08 Jul 2018, 09:04 |
|
Alex Scarlet 22 Sep 2019, 05:55
I'm sold on this idea
|
|||
22 Sep 2019, 05:55 |
|
connor 31 Dec 2019, 02:10
How about this instead:
A GNU C++ Compiler written in C _________________ cars tech weed bitches country & thug life |
|||
31 Dec 2019, 02:10 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.