Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!uunet!mcsun!hp4nl!cbmnlux!ecl014!ronald From: ronald@ecl014.UUCP (Ronald van Eijck) Newsgroups: comp.sys.amiga.programmer Subject: Re: General questions regarding Tasks Message-ID: Date: 26 May 91 02:51:04 GMT References: <1991May24.160440.374@m.cs.uiuc.edu> <1991May24.192517.9935@m.cs.uiuc.edu> Organization: R&R Software Lines: 40 In article <1991May24.192517.9935@m.cs.uiuc.edu> schwager@m.cs.uiuc.edu (Michael Schwager) writes: >schwager@m.cs.uiuc.edu (Michael Schwager) writes: > >Oops I made a mistake in my pseudo-code. My task really looks like this: > >func3 () /* It's a task! */ >{ > endless_loop: /* depends on the parent task to annihilate this task > when the user hits a gadget */ > { > blah; > func1 (number); /* Oooo... can I do this? Say func1() only has automagic > variables. */ > Forbid (); > DrawImage (in_some_Window_declared_globally); > blah; > Permit (); > } >} >************ file 1 *********** > >Also, I RTFRKM's and know about the problems with calling DOS functions; I >shan't do that! > >Thanks for all the replies so far; I'm beginning to understand these >blasted things.... >-Mike If you use globals you should start your task by calling geta4() this fixes your a4 register so it points to the middle of your global data area. another solution is to use the large code/data memory model. Hope this helps, -- +-------------------------------------------------------------------------+ | Ronald van Eijck {eunet!}hp4nl!cbmnlux!ecl014!ronald | | | | We do the impossible at once for a miracle we need a little more time | +-------------------------------------------------------------------------+