4 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 11y 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 11y agoI don't really understand what this means. How is that different from how anyone else uses a compiler?
- animeweedlord 11y 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 11y 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 11y 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 11y agoBut what would qualify as an "asm code generator" if not a compiler? There are other free compilers. Clang comes to mind.
- genop 11y agoSpitbol has one.
- Annatar 11y 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 11y 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 11y agoNo. 1 is literally the exact definition of a "compiler". I still don't understand the distinction you're making.
- genop 11y 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 11y ago