Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!deimos.cis.ksu.edu!atanasoff!hascall From: hascall@atanasoff.cs.iastate.edu (John Hascall) Newsgroups: comp.arch Subject: Re: Self-modifying code Message-ID: <1619@atanasoff.cs.iastate.edu> Date: 11 Oct 89 22:12:17 GMT References: <6481@pt.cs.cmu.edu> <9175@etana.tut.fi> Reply-To: hascall@atanasoff.UUCP (John Hascall) Organization: Iowa State Univ. Computation Center Lines: 31 In article <9175@etana.tut.fi> pl@etana.tut.fi (Lehtinen Pertti) writes: }From article <6481@pt.cs.cmu.edu>, by koopman@a.gp.cs.cmu.edu (Philip Koopman): } I've been lately wondering if there is any architecture } with possibility to execute instruction indirectly. } I mean something like: } } exec (r0) ; execute instruction pointed by r0 } Does anyone know? Well, how about the IBM 370 series. (not exactly modern, I know) If I recall correctly: EX mask,location location: Fetches the target instruction at "location" and ORs "mask" with (some of) the target instruction and then executes the resulting instruction. Control resumes at "next instruction". The EX instruction is used all the time as it is the only decent way to do a number of things. John Hascall ISU Comp Center