which microcontrollers [are] conducive to assembly language programming.
All of them, obviously.
You might take a look at the FTDI "VNC2" USB Microcontroller.
About the worst assembly language documentation I've ever seen, and I've been unable to find ANY description of the actual CPU architecture that might make it more understandable :-(
Dude! You've stolen my go-to "awful ISA" example!
Perhaps you'll be interested in what I've written about it.
https://www.reddit.com/r/RISCV/comments/w5nduu/comment/ih9o9e2/A lot of architectures are supported by the Gnu assembler, which is sort-of nice since you get common directives and macro language and such. But it's an assembler aimed more at supporting their compilers, so it's not always the most pleasant assembler to use. And the syntax it implements for a given CPU may not match the CPU vendor's syntax.
Right. It's not the best for writing large amounts of asm as a result. Even something as simple as assigning symbolic names to registers in a function isn't possible except by using the C preprocessor and #define (and #undef after the function).
The Arm (ONLY!) version adds a directive for this:
foo .req r0
add foo,#1
.unreq foo
I don't know why that isn't propagated into the generic codebase.
A bunch of the modern microcontrollers won't document the CPU in the chip vendor documentation. They just refer you to the CPU IP vendor documentation. This includes ARM, MIPS, ESP (tensilica), and RISC-V. This CAN lead to a frustrating exercise in figuring out exactly what subset and/or extensions your particular chip can use, which what limitations might exist.
I actually prefer that, as long as they give you a good pointer to it.
It's far better KNOWING they used a standard core than having to pore through the entire document to see if they made any little changes.
They certainly should tell you exactly which core and what set of extensions are used.
I find the ARM Cortex-M0 particularly annoying - any orthogonality was discarded to "compress" the instructions into 16 bits, and you're left wondering "which data processing instructions support an immediate operand and what was the range of those operands?"
Yes. This is what makes me hesitant to recommend C-M0 (Thumb1 in general) as the first asm for a beginner to learn. The actual operations provided are good, and there is a nice limited and documented set of them, well supported by compilers and other tools, but there are something like TWENTY different instruction formats with different sets of registers that can be used, different sizes of constants/offsets, and some are signed and some are unsigned.
It's a real shame because the RP2040 is a pretty nice chip, and on the lower end you have the Puya 10c chip too (PY32F002A), and also the SAMD21 family with a number of boards including Arduinos the Seeeduino XIAO etc.
Full Thumb2 is just TOO complex, too many instructions, no well-defined subsets.
Same for Arm64. H&P tried to simplify it with LEGv8 but other than a GUI simulator there is no tool support (e.g. GCC or LLVM).
Original ARMv2 or ARMv4 or something is perhaps the best option (for beginners) in the Arm ISA family. The number of instructions and instruction formats is small. But the individual instructions are complex, with conditional execution of everything and the "flexible 2nd argument".
This is where I think RV32I or RV32E or even RV64I are so great. Just 40ish instructions in four basic formats, all registers are usable by every instruction, all immediate/offsets are signed with all normal instructions having 12 bits, with a couple of special instructions with 20 bit immediate. Documented in a single cohesive (for RV32I) chapter I think 18 pages long. Well supported by tools and libraries.
And while the C extension formats are a bit more complicated and irregular -- similar to Thumb1 -- you can tell the compiler/assembler not to use them, or if it is allowed to use them then it's transparent to the programmer. You just write the full, general, instruction and the tool uses the compact one when it can. Thumb2 works in the same way, but it's a considerably larger instruction set, even in the C-M3.
Well, ok, maybe C-M3 (ARMv7-M, without FP) is the best beginner's Arm ISA.