Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!joyce!sri-unix!garth!smryan From: smryan@garth.UUCP (Steven Ryan) Newsgroups: comp.arch Subject: Re: Self-modifying code Summary: Being nasty and picking gnits. Message-ID: <1008@garth.UUCP> Date: 17 Jul 88 21:01:18 GMT References: <5254@june.cs.washington.edu> <76700032@p.cs.uiuc.edu> <1276@edge.UUCP> <361@scolex> Reply-To: smryan@garth.UUCP (Steven Ryan) Organization: INTERGRAPH (APD) -- Palo Alto, CA Lines: 49 >to Subroutine instruction: RJ (Return Jump) (on the 6600); what this >would do is write a into (the Technically, + EQ caller_address+1 - VFD 30/0 >bit instructions], so the assembler had to look for labels for RJ Compass forces upper on all labels. >instructions and pad out the rest of the word with NOPs 8-)). And SB0 B0+46000. >did this because it lacked one simple little feature found on many of >today's machines: a stack.) Actually hardware support of a stacks. I implemented reentrant and recursive stack frames for doing multitasking in Compass. >the indicated write, and start execution at +1, and, to return, you >would JP (or do an unconditional branch, which wouldn't clear out the >instruction cache) to the entry point, and boom! you're back where you want And sneaky code puts exit code above the entry point so that it falls into jump back to the caller: RTN0 exit processing RTN PS entry point. junk ZR ...,RTN0 more junk >[i.e., the memory was accessed as one of 8(?) banks of RAM, with each 8, Aye. >succeeding address in a different bank. Accessing any individual address could >be, oh, 8 times slower than the machine cycle, but accessing the next Actually, I think a major cycle was 10 minor cycles. >They were very fast machines, as I've said here before. If only they didn't >have NOS... Meaning NOS 1 I hope. NOS 2 has a lot nifty features I wish Unix had.