Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!ncar!ico!rcd From: rcd@ico.ISC.COM (Dick Dunn) Newsgroups: comp.arch Subject: Re: Self-modifying code Summary: good, bad, ugly Keywords: 6600 Message-ID: <7377@ico.ISC.COM> Date: 19 Jul 88 20:02:02 GMT References: <5254@june.cs.washington.edu> <76700032@p.cs.uiuc.edu> <361@scolex> <7362@ico.ISC.COM> Organization: Interactive Systems Corp, Boulder, CO Lines: 16 One other quick note about self-modifying code on the CDC 6000/7000 series: It was generally a very bad idea to do it because of the instruction lookahead. The 7600 looked farther ahead than the 6600, and the 6400 only had a one-word instruction lookahead. Thus, depending on the processor, it might or might not have already fetched an instruction before you modified it--leading to the superficially baffling phenomenon that the processor would appear not to have executed the instructions which would show up in a memory dump. But it's an ill wind, etc... The fact that self-modifying code behaved differently (but predictably so) on different processor models was used to create a code sequence which could identify the processor at run time and let code adapt itself accordingly. -- Dick Dunn UUCP: {ncar,nbires}!ico!rcd (303)449-2870 ...Are you making this up as you go along?