Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!smosjc!brett From: brett@smosjc.UUCP (Brett Coon) Newsgroups: comp.sys.amiga.tech Subject: Self Modifying Code! Keywords: help, danger, cache, no flames Message-ID: <293@smosjc.UUCP> Date: 6 Jul 90 01:52:44 GMT Organization: S-MOS Systems, San Jose, Ca., USA Lines: 19 Is there an acceptable means to write self-modifying code on the Amiga? Assuming for the sake of argument that I have a good reason to do such a thing (and there's a good chance I don't), can I do it without risking future compatibility? My current plan is to select one of a few possible versions of the code at the beginning, and then patch the code to use the appropriate version. It would be done once, during initialization, so performance at this point is entirely unimportant. What I envision is an operating system call to clear the instruction cache, or do nothing if there is no cache. Surely something like this is done by the loader, right? Please, don't tell me the evils of self-modifying code, I'll only use it if I have to. Pretend this question is entirely academic. -brett -- |Brett Coon | uunet!smosjc!brett | |S-MOS Systems, Inc. | "You like 'em, anchovies?" | |San Jose, CA | -Runaway Train |