Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!uunet!seismo!dimacs.rutgers.edu!rutgers!cbmvax!cbmehq!babylon!rbabel From: rbabel@babylon.rmt.sub.org (Ralph Babel) Newsgroups: comp.sys.amiga.programmer Subject: Re: Help! (AmigaDOS CreateProc/LoadSeg) Message-ID: <06417.AA06417@babylon.rmt.sub.org> Date: 6 Mar 91 11:58:01 GMT References: <63329@eerie.acsu.Buffalo.EDU> <19578@cbmvax.commodore.com> Reply-To: cbmvax.commodore.com!cbmehq!babylon!rbabel (Ralph Babel) Lines: 18 In article <19578@cbmvax.commodore.com>, ken@cbmvax.commodore.com (Ken Farinsky - CATS) writes: > LoadSeg() needs a BPTR to a seg list, which can be faked > like: > > /* From Mike Sinz AmigaMail example */ > struct CodeHdr > { > ULONG SegSize; /* sizeof(struct CodeHdr) */ > ULONG NextSeg; /* Must be NULL */ > UWORD JumpInstr; /* set to 0x4EF9 (a jump instruction) */ > APTR Function; /* a pointer to the function */ > } I'd call this self-modifying code. Ralph