Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!tut.cis.ohio-state.edu!rutgers!bellcore!tness7!tness1!sugar!ficc!peter From: peter@ficc.UUCP (Peter da Silva) Newsgroups: comp.arch Subject: Re: Self-modifying code Keywords: self modification, code generation Message-ID: <1116@ficc.UUCP> Date: 18 Jul 88 15:08:19 GMT References: <5254@june.cs.washington.edu> <76700032@p.cs.uiuc.edu> <1110@ficc.UUCP> Organization: SCADA Lines: 13 In article <1110@ficc.UUCP>, karl@ficc.UUCP (karl lehenbauer#) writes: [ about some neat examples of SMC ] What about the PolyForth scheduler. Each entry in the process table contained a jump instruction. The next instruction was the save space for the current PC in a context switch. So a context switch involved jumping to the next processes process table entry. When a process waited, it put the address of the next process table entry in that location. This meant that the process was going to effectively busy-wait, but it's a *very* efficient busy-wait. For the sort of tight real-time control that PolyForth was designed for, this was apparently the most efficient way of doing things. -- Peter da Silva `-_-' Ferranti International Controls Corporation. "Have you hugged U your wolf today?" (uunet,tness1)!sugar!ficc!peter.