🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #2511

Re: Self-modifying code

#2511
From: Usenet file owner
Date: Tue, 10 Oct 1989 20:16
21 lines
1295 bytes
In article <1080@mipos3.intel.com> jpoon@mipos2.intel.com (Jack Poon~) writes:
>Greetings,
>
>Could any experts out there educate me WHY and HOW does self-modifying code use?
>What the advantage of using self-modifying code that non-self-modifying code
>cannot achieve?

Back when I was doing assembly hacking on the RadioShack coco,  I needed
a super fast block copy.
To save a few cycles per loop, I  poked the calculated indecies into
the load/store instructions.
I ended up with a routine that could copy blocks at a rate
of less than 3cycels per byte. This is good considering each
instruction takes a minimum of 2 cycles, and it takes two instructions
to do a load here; store there.

>Is there any compiler which will generate code that self-modified?  
>A small and useful example of self-modifying will be very helpful.

possible, but i doubt it.
 Joe Porkka   porkka@frith.egr.msu.edu
Technical Details
Message-ID: <4940@cps3xx.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!eecae!cps3xx!usenet
References: <1080@mipos3.intel.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!eecae!cps3xx!usenet
From: usenet@cps3xx.UUCP (Usenet file owner)
Newsgroups: comp.arch
Subject: Re: Self-modifying code
Message-ID: <4940@cps3xx.UUCP>
Date: 10 Oct 89 20:16:10 GMT
References: <1080@mipos3.intel.com>
Reply-To: porkka@frith.UUCP (Joe Porkka)
Organization: Michigan State University
Lines: 21