flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution
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. |
|||
![]() |
|
connor
"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. |
|||
![]() |
|
ManOfSteel
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. |
|||
![]() |
|
Alex Scarlet
I'm sold on this idea
|
|||
![]() |
|
connor
How about this instead:
A GNU C++ Compiler written in C _________________ cars tech weed bitches country & thug life |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.