I'm wrapping up some product code on a modern 8051.
I actually surprised myself, because I ran out of memory in the data area.
I need to check with the manufacturer because supposedly this chip has 256 bytes of RAM in both the IRAM and XDATA. I have to dig through the device setup files from the manufacturer, because it isn't like an ARM where you specify the address ranges in KEIL directly.
I understand legacy 8051s had an external memory source in some cases, that you could access using the XDATA syntax. I understand the architecture issue to a degree since I've been building a mock 8 bit MCU in Verilog.
On a contemporary 8051, is it really that big of a performance to use XData area for variables?
Am I correct this is really a micro-optimization in terms of system gain? Like fractions of microseconds (µs) difference, or is it worse?
I am guessing they just kept bolting on new memory areas and kept the system back compatible with the original instruction set architecture as best they could. I don't really know the 8051 ISA to any real depth.
Nope. The original 8051 had all of these memory regions. There was then a variant (the 8052) that had double the amount of internal RAM (accessible only as stack or IDATA).
Back in the day I used to keep pushing for that 8052 instead of the 8051, and frequently got refused. (I was only a junior programmer in the 1980s and didn't have the clout to authorise it.)
Later on various manufacturers added multiple data pointers and extra interrupt priority levels and stuff, but the basic instruction set remained the same.
The one good thing with having such limited resources was having to know the architecture well in order to code efficiently. I sometimes think that this skill is now sorely lacking.