Path: utzoo!attcan!uunet!samsung!sdd.hp.com!usc!julius.cs.uiuc.edu!psuvax1!rutgers!cbmvax!jesup From: jesup@cbmvax.commodore.com (Randell Jesup) Newsgroups: comp.sys.amiga.tech Subject: Re: THOSE DAMNED BPTR'S Message-ID: <15792@cbmvax.commodore.com> Date: 11 Nov 90 21:07:11 GMT References: <18556@ultima.socs.uts.edu.au> Reply-To: jesup@cbmvax.commodore.com (Randell Jesup) Organization: Commodore, West Chester, PA Lines: 23 In article <18556@ultima.socs.uts.edu.au> mark.newton@f805.n680.fido.oz.au (Mark Newton) writes: >I was under the impression that I could use LoadSeg() to load the code for the >new process, initialize a (struct Process) so that it's pr_SegList was pointing >to the LoadSeg()'ed code, set the initial PC to the start of the code and call >CreateProc(). Ok so far? Ok. Not OK. Read the documentation on CreateProc. Note that it takes a seglist (as returned by LoadSeg), NOT a Process structure. Anyone allocating their own process structures will be hung by their toenails. :-) >LoadSeg() returns a long, and the pr_SegList is a BPTR. I haven't got the >autodocs (I have got 1.3 Libraries and Devices), but I assume that the return >address from LoadSeg() is the starting address in memory of the segment. How >can I convert this to a BPTR? LoadSeg returns a BPTR. Note that Dos is documented in the the Bantam AmigaDos book, not the RKMs (due to an old contract). The Autodocs (including Dos) are available from CATS. -- Randell Jesup, Keeper of AmigaDos, Commodore Engineering. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com BIX: rjesup Common phrase heard at Amiga Devcon '89: "It's in there!"