Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cbmvax!cbmehq!cbmfra!swinjm!forgeas From: forgeas@swinjm.UUCP (Jean-Michel Forgeas) Newsgroups: comp.sys.amiga.programmer Subject: Re: Help! (AmigaDOS CreateProc/LoadSeg) Message-ID: <18cb4d63.ARN0b56@swinjm.UUCP> Date: 8 Mar 91 13:06:43 GMT References: <63329@eerie.acsu.Buffalo.EDU> <19578@cbmvax.commodore.com> <06417.AA06417@babylon.rmt.sub.org> Reply-To: forgeas@swinjm.UUCP (Jean-Michel Forgeas) Followup-To: comp.sys.amiga.programmer Organization: The Software Winery Lines: 29 In article <06417.AA06417@babylon.rmt.sub.org>, Ralph Babel writes: > 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. I don't see where you find self-modifying code in the example above. All I see is data (while there is no process running on it). Effectively after CreateProc() on it this data becomes code, but there is no modification of the code after CreateProc(). -- \___/ Jean-Michel Forgeas \-/ cbmvax!cbmehq!cbmfra!swinjm!forgeas | The Software Winery -^- And, where is the universe ?