🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #4320

Re: Self-modifying code

#4320
From: Randell Jesup
Date: Wed, 11 Jul 1990 21:39
31 lines
2130 bytes
In article <b27040e1474d26965764@canremote.uucp> john.russell@canremote.uucp (JOHN RUSSELL) writes:
>Does the shareware program PowerPacker violate the rules governing 
>self-modifying code?  I would expect that its unpacking routine only 
>modifies that data cache.  However I don't know if it overwrites the 
>unpacking routine with any other code.
...
>However I've got my arp.library crunched and the requester still pops 
>up, likewise I can setfont to a crunched font or send stuff to SPEAK: 
>and PRT: after crunching them.
> 
>So, is this program "processor-friendly"? 

	Probably not, though it's likely to work fine on an '030 in most cases.
However, if you get unlucky, or on a machine with a larger cache (an A3000
with cache board, or an '040, etc) it may well fail.

	The stock '030 cache is small enough that it rarely causes problems
with things that are being loaded (and therefore the only conflict would be
if code had been executed out of code that was then freed, and then allocated
for <whatever> to put code into, and then the code was executed, all before
the cache entry was overwritten.  A larger cache (or very bad luck) will hit
this pretty easily.  Also note that classic self-modifying code is FAR more
likely to have problems with the '030 cache, since you don't have the free/
allocate/startup (which is usually enough to cause it to be forced out)
to get through.  You can see this problem with a lot of games that don't
work on '020/'030's.

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
Common phrase heard at Amiga Devcon '89: "It's in there!"
Technical Details
Message-ID: <13155@cbmvax.commodore.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rutgers!cbmvax!jesup
References: <b27040e1474d26965764@canremote.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rutgers!cbmvax!jesup
From: jesup@cbmvax.commodore.com (Randell Jesup)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Self-modifying code
Message-ID: <13155@cbmvax.commodore.com>
Date: 11 Jul 90 21:39:37 GMT
References: <b27040e1474d26965764@canremote.uucp>
Reply-To: jesup@cbmvax (Randell Jesup)
Organization: Commodore, West Chester, PA
Lines: 31