??? 04/06/07 22:09 Read: times Msg Score: +1 +1 Informative |
#136774 - My reasoning Responding to: ???'s previous message |
Craig Steiner said:
But I would also say there's certainly great benefit in getting to know an architecture at a level that you can write an assembler or, better yet, a compiler. Andy Neil said:
For the purpose of getting to know an architecture, I'd say that the assembler was the better option.
An Assembler has a direct 1:1 mapping from source instructions to machine instructions. With a compiler, I'd have thought there'd be too many distractions from the detail of the high-level language, and its extra complexities...? You're probably right about the complexities of the high-level language in writing a compiler. The reason I put more emphasis on the compiler is because while you can get to know the instructions perfectly fine writing an assembler, writing a compiler would force you to also think through how to use those instructions to do something useful. In my opinion, you can write an assembler without actually having to understand the first thing about what an instruction really does. You just need to convert some text to some bytes and you don't have to have any understanding of the instructions themselves. To write a compiler, you need to know how and when to use those instructions to do whatever it is your compiler is compiling. Actually, more accurately, it's probably writing the libraries that are linked into a compiled program that would be most useful for mastering an architecture. There'd be some benefit in writing the compiler, but most of the learning would probably be in writing the libraries. That's also the fun part, IMHO. :) Regards, Craig Steiner |