Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!bagate!cbmvax!jesup From: jesup@cbmvax.commodore.com (Randell Jesup) Newsgroups: comp.sys.amiga.programmer Subject: Re: usage of CreateProcess() ?? Message-ID: <21536@cbmvax.commodore.com> Date: 14 May 91 05:58:56 GMT References: <11388@uwm.edu> <1991Apr25.144702.30033@kuhub.cc.ukans.edu> Reply-To: jesup@cbmvax.commodore.com (Randell Jesup) Organization: Commodore, West Chester, PA Lines: 42 In article <1991Apr25.144702.30033@kuhub.cc.ukans.edu> markv@kuhub.cc.ukans.edu writes: >In most cases, a child can even use a Lib base given to it by its >parent, except things like the mathieeexxxx libraries, which keep >track of information on a task by task basis. Not a good habit to get into, though, in case a library starts having per-task data, or if you run across a new library with per-task data. >string (not a BPTR to a BSTR), and Priority is the priority (-127 to +127) ^^^^ -128 >or, if you want to use your own code in memory, you need to dummy a >seglist like this: > >SegBase: > DS.L 0 > DC.L 16 > DC.L 0 >CodeStart: > #Code starts here. That should be: DC.L 16 ; value doesn't really matter - make it 16 anyways SegBase: ; NOTE: points to pointer to next segment, not size! DC.L 0 ; should be 0 - BPTR to next segment * code starts here - often a jump to real routine. >And then convert SegBase to a BPTR ie: > > Foo = CreateProc("MyProc", 0L, BADDR(SegBase), 4096L); ^^^^^^^^^^^^^^ That's (((LONG) SegBase) >> 2), not BADDR(...). BADDR goes the other direction (BPTR to CPTR). -- Randell Jesup, Keeper of AmigaDos, Commodore Engineering. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com BIX: rjesup Disclaimer: Nothing I say is anything other than my personal opinion. Thus spake the Master Ninjei: "To program a million-line operating system is easy, to change a man's temperament is more difficult." (From "The Zen of Programming") ;-)