[Coco] Linville's ramblings on assembly vs machine code

Brian Goers briang0671 at sbcglobal.net
Wed Jul 12 14:40:09 EDT 2017

Since this topic is not "assembly vs machine code".
It is time to start a new Subject line.

Thanks everyone.

On 7/12/2017 11:03 AM, Mathieu Bouchard wrote:
> Linux never ever loaded a full physical copy in RAM. It's always been 
> loaded on-demand, whenever the CPU tries to access a block of 4k that 
> hasn't been loaded yet. Once loaded, it is shared among all processes, 
> even if it's read-write, but if a block is written to be a process, it 
> becomes non-shared so as to not affect the other copies. Linux has been 
> like that since about 1992, I think, but I don't think that it was the 
> first OS to have all of those features at once.
> Le 2017-07-11 à 11:35:00, L. Curtis Boyle a écrit :
>> You can do self-modifying code “legally” in OS-9 - but you have to 
>> copy the routine(s) into your data area and execute them from there. 
>> The reason it doesn’t work “normally” is that a program can be shared 
>> by multiple processes (they all run the exact same code, just with 
>> different data areas and stacks) - and it wouldn’t work well if a 2nd 
>> iteration of a program thinks it has one version of the self-modifying 
>> code, but the 1st iteration has already changed it to something else. 
>> If you went for a more memory bloated Unix/Linux model (a full 
>> physical copy in RAM of each copy of the same program), you might be 
>> able to get away with it (although things like program CRC checks 
>> would fail, unless you updated it each time it self modified), but for 
>> an 8 bit machine like the Coco, that would suck way too much RAM. 
>> Since the data area is unique to each process, you can do 
>> self-modifying code in that area, and it won’t corrupt any other 
>> copies of that program running.
>   ______________________________________________________________________
> | Mathieu BOUCHARD --- tél: 514.623.3801, 514.383.3801 --- Montréal, QC


  Brian Goers
  Club Librarian         http://glensideccc.com  Fest information here.
  & Treasurer
         The 27th Annual "Last" Chicago CoCoFEST!
                  Date to be determined

More information about the Coco mailing list