5 ms·
I found the AVR instruction set pretty straight forward. Granted, it was my first forray into assembly and I learned it around 17 years ago at age 14. Maybe eve
by blackguardx 11y ago
I found the AVR instruction set pretty straight forward. Granted, it was my first forray into assembly and I learned it around 17 years ago at age 14. Maybe everything seems easy in hindsight at that age.
I've never programmed MSP430s in assembly, but I have for PICs and found their instruction set to be more funky than AVR.
- tptacek 11y agoSo first a couple caveats: (1) I'm sure AVR is a hell of a let better than PIC, (2) I come at this from a really weird place (exclusively emulators and compilers), and (3) I'm not talking about the AVR parts themselves, which might be more cost-effective for a given project. That said: * Harvard architecture (split I & D memory) * 8 bit registers * Not at all orthogonal, and particularly painful for pointer addressing * The stack pointer is annoying to work with * Address wrap at physical memory bounds, rather than the bounds of address space I could pick a bunch more nits that would only really be relevant to someone writing an emulator (complicated instruction decode, IO addressing, &c) but those are my big complaints. I find MSP430 much more pleasant to work in.
- colanderman 11y agoThose are all true (though that an 8-bit microcontroller has 8-bit registers is… unsurprising). However I am referring to the instructions themselves, which were well-engineered to match the needs of a compiler. The result is very compact assembly for most C programs that you would write on an 8-bit microcontroller (including things like 16-bit arithmetic).