6 ms·
"And no good book is as good as disassembly output." [x] Strongly agree [ ] Agree [ ] Neutral [ ] Disagree [ ] Strongly disagree For me, C, i.e., GCC, is mos
by genop 10y ago
"And no good book is as good as disassembly output."
[x] Strongly agree
[ ] Agree
[ ] Neutral
[ ] Disagree
[ ] Strongly disagree
For me, C, i.e., GCC, is most useful as a faster way to generate assembly for a particular CPU than typing it out from scratch. I use GCC as a code generator. I'd like to see more free asm code generators, but I am not holding my breath.
I do appreciate C as a medium for distributing reasonably efficient software.
- umanwizard 10y agoI don't really understand what this means. How is that different from how anyone else uses a compiler?
- animeweedlord 10y agoAs in thinking in terms of what assembly you want the compiler to produce, and not trusting it to do so. Whereas people that program in higher level languages tend to think mostly in terms of the language semantics.
- omginternets 10y agoI think he means that he works like this: 1. Write some C 2. Dump the corresponding assembly code 3. Modify the code by hand
- genop 10y ago4. Assemble 5. Load into assembly debugger 6. Learn There is "C", the language, which can be relatively simple. Or hopelessly opaque depending on the author. I think of C the language as just a shorthand for assembly. Only because that's how I use it. http://www.lysator.liu.se/c/bwk-tutor.html http://www.lysator.liu.se/c/bwk-tutor.html But then there is "C" in practice: the specifications, the "standard" libraries, preprocessors, Makefiles, autoconf, etc.
- umanwizard 10y agoBut what would qualify as an "asm code generator" if not a compiler? There are other free compilers. Clang comes to mind.
- genop 10y agoSpitbol has one.
- Annatar 10y agoLet us see... in my day, we called an "asm code generator" an assembler... anyone remember MasterSEKA, Devpac, TRASH'M-One and ASM-one?
- genop 10y ago1. Program that reads some input (e.g., C language) and generates asm and/or opcodes. 2. Program that reads asm and/or opcodes and generates binary numbers ("object files"). No. 1 is what I need. No. 2 is what I call an "assembler". Although terminology means less to me than what a program actually does.
- umanwizard 10y agoNo. 1 is literally the exact definition of a "compiler". I still don't understand the distinction you're making.
- genop 10y agoThat's because it is a compiler. No. 1 is a program that accepts input (e.g., RTL, MINIMAL, etc.) and generates asm. I like to call this an asm code generator. Because today when people say "compiler" they are often referring to a collection of programs, some of which do not generate asm.
- umanwizard 10y ago