Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!comp.vuw.ac.nz!actrix!templar!jbickers From: jbickers@templar.actrix.gen.nz (John Bickers) Newsgroups: comp.sys.amiga.programmer Subject: Re: Code Address from Task struct? Message-ID: <11169.tnews@templar.actrix.gen.nz> Date: 10 Feb 91 22:37:05 GMT References: <4713@mindlink.UUCP> Organization: TAP, NZAmigaUG. Lines: 18 Quoted from <4713@mindlink.UUCP> by Harvey_Taylor@mindlink.UUCP (Harvey Taylor): > Is there anyway to find any Task's Segments given simply the > Task structure? I was looking at a little utility to print Task/ Not all tasks consist of a segment list, so you can't do this for everything. I think the closest you can get for tasks only is the PC register from the stack when it is not active (so presumably you have to disable interrupts to kill task switching, pluck the value(s), then enable interrupts again). If the task is a Process, though, you can use the pointer in the struct Process, which is a superset of the struct Task (ie: struct Process *me = (struct Process *)FindTask(NULL);). > -harvey -- *** John Bickers, TAP, NZAmigaUG. jbickers@templar.actrix.gen.nz *** *** "Patterns multiplying, re-direct our view" - Devo. ***