3 ms·
Yay for STM8. Cheap as dirt especially for how capable they are, and pretty sweet architecture for an 8 bit.
by davidgould 6y ago
Yay for STM8. Cheap as dirt especially for how capable they are, and pretty sweet architecture for an 8 bit.
- garaetjjte 6y agoNo GCC support, only 6 registers.. meh. I think AVR is most friendliest from all 8 bit architectures.
- segfaultbuserr 6y agoMost 8-bit machines are historical and suffered from the technological limitation of its time, they usually have few registers, an accumulator-based architecture, no multiplication/division instructions, limited addressing mode (especially, no efficient base+addr). So in general, they are not suitable for compiled languages, and hand-tuned assembly is required for good performance. But it actually makes sense for mass-produced applications when simplicity and cost are important. On the other hand, I believe the AVR is one of the only major 8-bit architectures designed using a modern approach, specially optimized for modern C-based programming.
- davidgould 6y agoSTM8 is a fairly new design although with some similarities to the 6502 and 6800. It does have multiply and divide instructions. It also has a plethora of addressing modes: ld a, #42 ; immediate. C constants ld a, var ; direct. C globals and statics ld a, (sp, 4) ; sp relative. C locals and arguments ld a, (x) ; indirect. C *ptr (ptr in register) ld a, (x, 42) ; indexed indirect. C ptr->foo (ptr in register) ld a, [ptr] ; memory indirect. C *ptr (ptr in memory) ld a, ([ptr],x) ; indexed memory indirect. C ptr->foo (ptr in memory) There are more, but mainly variations in width and PC relative jumps.
- segfaultbuserr 6y agoThanks for the correction.
- davidgould 6y agoSDCC is the open source compiler of choice for stm8. It's not GCC, but it's enough. I'd be tempted to agree about the registers except that it takes wider instructions to encode the registers used so a well thought out accumulator based architecture can result in very compact code. stm8 has a lot of one byte instructions and most except for branches and word operations are single cycle as well.