4 ms·
It's still a decent machine for C especially when compared with, say, 8051. I'm currently developing an entire product line based on a '51 derivative and just s
by kosma 10y ago
It's still a decent machine for C especially when compared with, say, 8051. I'm currently developing an entire product line based on a '51 derivative and just seeing what kind of assembly Keil C51 compiler produces is enough to make my eyes bleed. The amount of kludges required to make C work on that architecture is horrifying. Want an example? There's no stack when running under C51.
- vardump 10y agoThere's certainly a stack when running under C51, for function call returns. C51 just assigns local variables into 128 byte data segment. But say, PUSH ACC works just fine when you drop into assembler. Then again, stack on 8051 might be sometimes pretty small. From 10 to 128+ bytes.
- kosma 10y agoRight. Still, the fact that local variables aren't stack- but overlay- based is enough to blow my mind.
- loeg 10y agoYeah. The small device I am most familiar with is the z80, which is really not a good C machine either.