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

Darren A mechacoco at gmail.com
Tue Jul 11 11:51:52 EDT 2017


On Mon, Jul 10, 2017 at 6:04 PM, Gene Heskett wrote:

>
> I've seen quite a few disparaging remarks about self-modifying code pass
> by in this thread. Sloppy coding WILL bite you in the butt, so I got to
> tell you there is not a thing wrong with it if you have a good grip on
> what it is you are doing.
>


I remember self-modifying code being a compatibility issue for Apple when
they introduced the Macintosh Quadra machines with a 68040 CPU.  The 68040
has separate caches for code and data.  When an application executed
instructions to write modified code it would end up being cached as data
instead.  Complaints came in about applications that worked fine on Macs
with a 68000, 020 or 030 but would crash on an 040.

Apple had to provide a special Control Panel for the Quadras which allowed
a user to disable the caches if they encountered a program that wouldn't
run correctly.  Of course disabling the caches had a major impact on the
machine's performance.


- Darren


More information about the Coco mailing list