3 ms·
> It's not magic it's just a simple map operation taking the text from the assembly and 1:1 mapping it (in most cases) to opcodes. Maybe in the Z80, but in mo
by witty_username 10y ago
> It's not magic it's just a simple map operation taking the text from the assembly and 1:1 mapping it (in most cases) to opcodes.
Maybe in the Z80, but in modern x86 the instructions are broken down into micro ops and also pipelined (multiple pipelines, even).
> Knowing the opcodes by heart is nice for debugging and decompiling/reverse engineering code. It's fun to do and a really important skill, in my book, for anyone doing computer science in the real world (and if you're paying >10k/semester at college you should know how to do it!).
Why would you need to memorize hex opcodes for CS in the real world? I'll just use objdump or my favorite disassembler (even gdb can print instructions).
> will help you understand how to write a compiler.
Not sure how it will help one understand.
- gravypod 10y agoYou've taken assembly, transformed it into opcodes in paper, and then manually typed that into a file. The instructor should ask "Is there a way that you can do this that would allow you to avoid doing this?" You've now been - Told there's a better way - Want to stop doing this as it's error prone and boring - Know every step of binary construction by heart That's the perfect starting ground for exploring cs in my book.