4 ms·
comefrom is an excellent and seriously useful instruction. My team has (kind of) implemented it in hardware as a way of patching ROM code in RAM. When the PC
by kwantam 17y ago
comefrom is an excellent and seriously useful instruction.
My team has (kind of) implemented it in hardware as a way of patching ROM code in RAM. When the PC becomes equal to an address in the comefrom table, the PC is loaded with a RAM address and execution continues there.
If you have a big chunk of code that could need small tweaks, storing it in ROM and implementing a small RAM alongside it saves a lot of chip area.
I'm almost 100% sure Freescale does this on some of their 32-bit microcontrollers.
Yes, I design ICs. No, I do not work for Freescale.