Don't know about CLX, but on Siemens S5 (and probably on S7), the memory is organised like a hard disk i.e. it has a type of File allocation table, when a block is transferred (either in run or stop) the block is transferred to un-occupied memory, on the NON scan cycle the "FAT" table where the block address is allocated is replaced by the location of the new block, this is why Siemens have had the ability to download the whole program while in run mode.
However, Siemens have had OB's, PB's FB's, DB's since the early 80's so the program has never been one compiled block of code, in the early days, the memory on the S5's used to get full as the original blocks were not removed, so after a few modded blocks had been downloaded a compress of the memory had to be done via the programming IDE, later either the firmware and (or) the IDE was changed so that on every download the memory was automatically compressed & the old blocks moved, perhaps this is what Daba is on about.
I know this for a fact as it is possible by using logic to find the address & length of a block.
However, Siemens have had OB's, PB's FB's, DB's since the early 80's so the program has never been one compiled block of code, in the early days, the memory on the S5's used to get full as the original blocks were not removed, so after a few modded blocks had been downloaded a compress of the memory had to be done via the programming IDE, later either the firmware and (or) the IDE was changed so that on every download the memory was automatically compressed & the old blocks moved, perhaps this is what Daba is on about.
I know this for a fact as it is possible by using logic to find the address & length of a block.