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

Mark McDougall msmcdoug at iinet.net.au
Mon Jul 10 20:45:06 EDT 2017


On 11/07/2017 10:04 AM, 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.

Wringing performance out of a routine is another good example where 
self-modifying code can be justified. Unrolling a loop and then jumping 
into the code at the right point can save precious cycles on testing and 
branching each iteration.

> The best one can say of it was
> that it "Just Worked", for 17 years that I  know of.  That was what I
> intended for it to do, Just Work.

Only 17 years Gene? Pfft, barely enough time for each execution path to 
be exercised! :P

Regards,

-- 
Mark McDougall
<http://retroports.blogspot.com.au>


More information about the Coco mailing list