Path: utzoo!news-server.csri.toronto.edu!rpi!uupsi!sunic!liuida!d88ricwe From: d88ricwe@odalix.ida.liu.se (Rickard Westman) Newsgroups: comp.sys.amiga.programmer Subject: Re: Intuition beginner's problem Keywords: multitasking intuition Message-ID: <1991Mar18.111652.777@ida.liu.se> Date: 18 Mar 91 11:16:52 GMT References: <1511@tau.sm.luth.se> Sender: news@ida.liu.se (News Subsystem) Distribution: comp Organization: CIS Dept, Univ of Linkoping, Sweden Lines: 25 d89-rbn@sm.luth.se (Robert Buren) writes: >I'm learning how to use multitasking in my programs, but I seem to have >run into a problem here. I made a very simple program that opens up a >window and attaches some menus to it, and everything worked just fine. >The next step was to make an About routine that just opens up another >window and writes my name in it.. Still no problems. But(!) then I wanted >the Aboutroutine to run as a childtask. Hello Guru. > The program works just fine up to this line: >AboutTask = CreateTask("About",0,AboutCode,5000); Could it be that you're using the small code/data model with your compiler? In that case, most references to global data are made through a base register (usually a4). This will not be correctly initialized if one of your functions get called from an interrupt routine or from the scheduler. If you are using Manx, the single line geta4(); added at the very start of your AboutCode() could solve your problem. Lattice/SAS use something similar, I think. Check it with the manual. -- Rickard Westman, University of Linkoping, Sweden