4 ms·
I guess modern compilers (meaning anything Arduino era and up, at least when I first got into them maybe mid 2010s) abstract that away, because while true that
by Neywiny 9mo ago
I guess modern compilers (meaning anything Arduino era and up, at least when I first got into them maybe mid 2010s) abstract that away, because while true that it's doing that under the hood we at least don't have to worry about it.
- PaulHoule 9mo agoEven in the 1980s you had C compilers for micros that had bigger numbers than the platform supported. However, if you've got a small number of registers (esp on the 6502) it's not appealing to generate straightforward register-based code and you're likely to use interpreter methods like https://en.wikipedia.org/wiki/SWEET16 https://en.wikipedia.org/wiki/SWEET16 On machines like the Z-80, 6809, and the 8086 you had more real compilers. The AVR-8 is a special case because it has a huge register file (32 registers!) so if you are using 32-bit numbers you have room for 8 big registers. gcc supports 24-bit integers and those save resources taking just 3 native registers.