🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #2529

Re: Self-modifying code

#2529
From: John Hascall
Date: Wed, 11 Oct 1989 22:12
31 lines
1447 bytes
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
		       <next instruction>

            location:  <target instruction>


	    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
Technical Details
Message-ID: <1619@atanasoff.cs.iastate.edu>
Path: arc1-ca.pugleaf.net!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
References: <6481@pt.cs.cmu.edu> <9175@etana.tut.fi>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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