4 ms·
4. 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.
by genop 10y ago
4. 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 agoI see. So you are excluding the preprocessor, linker, type-checker (for some languages this is a separate program), assembler, etc.?
- genop 10y agoYeah. I'm sorry about the terminology. I guess I just like the term "code generator". When I use that term I envision simple filters that take ASCII input, maybe even some sort of "template", and transform it into some other format that's useful. Ideally, asm. But not always. For example, in GCC, for x86, there's a couple of programs that operate on i386-opc.tbl and i386-reg.tbl. I would not call them "code generators" but I suspect they are needed in order for "gcc -s" to work.
- Annatar 10y ago2. is also what I learned as "assembler": a program which takes ASCII source code (written in a language we call assembler), and assembles that source code directly into a binary executable (no linking). So, back in the day (and still for me, always): assembler: ASCII source code in assembler language -- "which language did you code that in? - Assembler." assembler: the integrated development environment (such as ASM-One) which produces executable machine code straight from source, with no linking step in-between; also known as a two-pass optimizing assembler.