3 ms·
I had a few year of expericene with AVR assembly (x86 was a pain)... but getting younger people to learn it is a pain. What would be the best way for someone t
by ajsnigrutin 4y ago
I had a few year of expericene with AVR assembly (x86 was a pain)... but getting younger people to learn it is a pain.
What would be the best way for someone today to learn assembly? Which architecture, chip, devkit etc. would be an ok start, without too many complications (init process, toolchain, good documentation, etc.), preferably on linux?
- delta_p_delta_x 4y agoIf you just want to teach assembly (assuming this includes the datapath/control units, the CPU pipeline, hazards, etc) today, you can't go wrong with Patterson and Hennessy's Computer Organisation and Design. Pick your version: MIPS[1], ARM[2], or RISC-V[3]. There's really no need to delve into hardware when teaching assembly, as software simulators/interpreters exist; there's QtSPIM[4], a LEGv8 simulator from ARM itself[5], and a RISC-V interpreter by Cornell[6]. [1]: https://www.amazon.com/Computer-Organization-Design-MIPS-Architecture-dp-0128201096/dp/0128201096/ref=dp_ob_title_bk https://www.amazon.com/Computer-Organization-Design-MIPS-Arc... [2]: https://www.amazon.com/Computer-Organization-Design-ARM-Architecture/dp/0128017333/ref=d_pd_vtp_sccl_4_4/130-0221064-4572619?content-id=amzn1.sym.8e065679-52e9-4d16-ae63-fa3d08b93cef&psc=1 https://www.amazon.com/Computer-Organization-Design-ARM-Arch... [3]: https://www.amazon.com/Computer-Organization-Design-RISC-V-Architecture/dp/0128203315/ref=d_pd_vtp_sccl_4_1/130-0221064-4572619?content-id=amzn1.sym.8e065679-52e9-4d16-ae63-fa3d08b93cef&psc=1 https://www.amazon.com/Computer-Organization-Design-RISC-V-A... [4]: https://sourceforge.net/projects/spimsimulator/files/ https://sourceforge.net/projects/spimsimulator/files/ [5]: https://github.com/arm-university/Graphical-Micro-Architecture-Simulator https://github.com/arm-university/Graphical-Micro-Architectu... [6]: https://www.cs.cornell.edu/courses/cs3410/2019sp/riscv/interpreter/# https://www.cs.cornell.edu/courses/cs3410/2019sp/riscv/inter...
- sureglymop 4y agoAt my school we had to write a base64 encoder/decoder in x86 assembly last year. Then we moved on and wrote a small shell in C. We had a lot of theory but the practical parts are what made it work imo. When working on the C stuff i often used compiler explorer to see which assembly is generated.
- t-3 4y agoARMv8 and RISC-V are both pretty easy and not full of ugliness like x86. Binutils as is good enough and pretty much available anywhere, but gcc or clang will work just fine too. GDB and LLDB work fine for debugging for a hobbyist like me, but I'm sure there are some IDEs that can give a nicer experience. Essential: https://developer.arm.com/documentation/ddi0487/gb/ https://developer.arm.com/documentation/ddi0487/gb/ https://riscv.org/technical/specifications/ https://riscv.org/technical/specifications/