Xref: utzoo comp.lang.c:11356 comp.arch:5527 Path: utzoo!attcan!uunet!nuchat!sugar!ficc!peter From: peter@ficc.UUCP (Peter da Silva) Newsgroups: comp.lang.c,comp.arch Subject: Re: Programmed code generation (was: Self-modifying code) Keywords: self-modifying code, generate-and-execute Message-ID: <1108@ficc.UUCP> Date: 15 Jul 88 20:25:20 GMT References: <3353@cognos.UUCP> <619@goofy.megatest.UUCP> <429@uwovax.uwo.ca> <12381@ut-sally.UUCP> Organization: SCADA Lines: 24 In article <12381@ut-sally.UUCP>, nather@ut-sally.UUCP writes: > In article ... pardo@june.cs.washington.edu (David Keppel) writes: > > There is nothing architecturally weird about programs that generate > > their own code. ...although few OPERATING SYSTEMS support this. > And no LANGUAGES that I'm aware of. But that's the whole point. CAN they? Do you count Forth as a language? For that matter, I've generated and then executed code in a program written in Forth running under UNIX. Real code, not threaded code: CREATE UNDER ASSEMBLER S )+ R0 MOV, S )+ R1 MOV, R0 S -) MOV, R1 S -) MOV, R0 S -) MOV, NEXT, Which can immediately be used... -- Peter da Silva `-_-' Ferranti International Controls Corporation. "Have you hugged U your wolf today?" (uunet,tness1)!sugar!ficc!peter.