Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!jonabbey From: jonabbey@cs.utexas.edu (Jonathan David Abbey) Newsgroups: comp.sys.amiga.emulations Subject: Re: Emulator Mechanics (sorry long post) Summary: Ah, but dude! What about self modifying code? Keywords: Emulator Compiler Message-ID: <235@atacama.cs.utexas.edu> Date: 6 Mar 91 03:20:02 GMT References: <4992@mindlink.UUCP> Organization: U. Texas CS Dept., Austin, Texas Lines: 26 The primary problem I see with a compile-type scheme is that self modifying code would go out the window. It would likely not be possible to determine in advance whether or not the code would self-modify, and it would certainly be impossible to determine in advance what the result of such activity would be. Because of this, you would need to have your run time code be able to jump in to an interpreted mode to handle the self modification, then recompile the effected code. Doable, perhaps, but not pretty and not at all simple. The other problem is that for something on the order of an MS-DOS emulator, you would need to be able to support the entire environment effectively. What if your Wordperfect 5.1 implemented on-line help as a TSR or some MS-DOS strangeness? Does MS-DOS support an overlay system? How about chaining? I truthfully don't know whether such a thing could be built. Given how many times I've been pleasantly surprised by apotheosistic programmers, I wouldn't be surprised if it were possible. But I suspect that an out-right compiler isn't in the cards. An interpreter that can do advance analysis on certain code segments and jump out to compiled segments would seem to be actually feasible, but I still am having dark visions of self-modifying code. -- ------------------------------------------------------------------------------- Jonathan David Abbey \"I am stronger than the passing time" -Frost the university of texas at austin \ jonabbey@cs.utexas.edu "Does any of this computer science/math?/psychology? \ (512) 472-2052 make sense?" -Me