Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbjade.BERKELEY.EDU Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!ucbjade!network From: network@ucbjade.BERKELEY.EDU (Berkeley Network) Newsgroups: net.arch Subject: Re: self-modifying code, conditionals Message-ID: <381@ucbjade.BERKELEY.EDU> Date: Wed, 26-Feb-86 20:10:49 EST Article-I.D.: ucbjade.381 Posted: Wed Feb 26 20:10:49 1986 Date-Received: Fri, 28-Feb-86 21:59:19 EST References: <546@tekcrl.UUCP> <426@utastro.UUCP> Reply-To: oster@ucblapis.UUCP (David Phillip Oster) Distribution: net Organization: University of California, Berkeley Lines: 26 In article <426@utastro.UUCP> nather@utastro.UUCP (Ed Nather) writes about self-modifying code: >It will return; it's too neat an idea to stay dead. What we lack is the >needed formal discipline to use it carefully. Spaghetti code has given 1) The language I use (built in forth) has an executable struct - viewed as an execution object it is a procedure. Vieweed as a data object it is a struct. What this means is, I can store the appropriate typed objects into fields in the structure (instructions, addresses, etc.) and then execute it. It is useful for just the purpose Ed describes - cranking every last iota of speed out of a piece of code that the machine is really too slow to do. And having a decent type structure for this kind of thing sure cuts down on errors. 2) Living without branches is not a new idea - The Aiken/IBM Mark 1 computer, an amazinearly computer built at Harvard, kept its data in RAM, but its program on siz paper tape readers. To program a loop, you got out the gummed paper and literally looped the tape! instead of a branch instruction (which advances the program counter) you executed an instruction that transferred to a different tape reader. (The teaching assistants used to challenge us to save room on the machine by coming up with a useful loop that used Mobius encoding. ---David Philip Oster --------------------- ``What do you look like when you aren't visualizing?'' Arpa: oster@lapis.berkeley.edu Uucp: ucbvax!ucblapis!oster