4 ms·
A word of warning for those wondering: this is not for Intel syntax, despite referencing the Intel doc. Minias can assemble itself ...but it's written in C an
by userbinator 5y ago
A word of warning for those wondering: this is not for Intel syntax, despite referencing the Intel doc.
Minias can assemble itself
...but it's written in C and uses a parser generator? IMHO it feels a bit backwards --- and perhaps even a bit cheating if you're doing this for a "bootstrap pilgrimage" --- to write a lower-level tool in a higher-level language. On the other hand, the same author also links to a C compiler in C, without a parser generator: https://github.com/michaelforney/cproc https://github.com/michaelforney/cproc
- guerrilla 5y ago> despite referencing the Intel doc. I don't know why you would think referencing Intel's x86 software developer manual has anything to do with what syntax an assembler would use. Anyone writing an assembler, regardless of its input syntax would refer to it. > ...but it's written in C and uses a parser generator? IMHO it feels a bit backwards --- and perhaps even a bit cheating if you're doing this for a "bootstrap pilgrimage" Who says they share your goals? It says they wrote this just for "fun and learning," i.e. to learn how an assembler works and how x86 instructions are encoded, maybe even to practice their C.
- programmer_dude 5y agoThe readme says it can "assemble" itself.
- guerrilla 5y agoThat's a valid complaint but not the one I'm responding to. I wonder if they mean it can assemble the output of the C compiler though.
- MobiusHorizons 5y agoThat is how I read it. This is intended to be paired with cproc, a c compiler that uses QBE for it’s backed. QBE outputs assembly not binaries, so an assembler could be used to assemble itself as part of that toolchain.
- andrewchambers 5y agoAuthor here, that's exactly what I meant. It can also assemble the cproc C compiler when it compiles itself - thus creating a loop. I updated the readme.
- andrewchambers 5y agoI updated the readme to better explain what I meant.
- andrewchambers 5y agoIt can assembly all the assembly generated by cproc - which can compile the tools it depends on including cproc itself. I will update the readme.