Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site wivax.UUCP Path: utzoo!linus!decvax!wivax!ss From: ss@wivax.UUCP (Sid Shapiro) Newsgroups: net.lang Subject: Re: Self-modifying code Message-ID: <19070@wivax.UUCP> Date: Thu, 5-Jan-84 14:37:36 EST Article-I.D.: wivax.19070 Posted: Thu Jan 5 14:37:36 1984 Date-Received: Fri, 6-Jan-84 02:43:25 EST References: <2157@fortune.UUCP> Organization: Wang Institute, Tyngsboro, Ma. 01879 Lines: 20 I can think of yet-another-good-reason for self-modifying code. Execution profilers: Without having access to the compiler code, I had to write an execution profiler. To do this I had the user insert one init-type routine as the first executable statement. The initializer then skipped through memory saving and replacing all of the subroutine calls, function calls, etc. with calls to a counter/timer init routines. The returns returned to the counter and the final user exit really returned to the report writer. (It was fun to write!) True, it was done in assembly language, but without access to the compiler, or writing a new simulator, how would YOU create a profiler? -- Sid Shapiro -- Wang Institute of Graduate Studies [cadmus, decvax, linus, apollo, bbncca, sco]!wivax!ss ss.Wang-Inst@Csnet-Relay (617)649-9731