Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!unisoft!bdt!david From: david@bdt.UUCP (David Beckemeyer) Newsgroups: comp.sys.atari.st.tech Subject: Re: Micrortx call out functions? Message-ID: <4008@bdt.UUCP> Date: 25 Jul 90 16:12:28 GMT References: <1146@cnps.PHILIPS.nl> Reply-To: david@bdt.UUCP (David Beckemeyer) Organization: Beckemeyer Development Tools, Oakland, CA Lines: 24 In article <1146@cnps.PHILIPS.nl> jg@hpldola.HP.COM (Joe Gilray) writes: >Has anyone solved this problem? Or done anything with the call-out >functions in Micrortx? > The "switch" call-out occurs at a very critical time, when no process is actually running. The routine must be very carefully constructed. Perhaps your routine overflowed the stack. The routines must be short and sweet. Rather than use the stack, try to save the regs. in a fixed area of memory. Perhaps even use your own stack area if you expect to nest deeply into C code (not really recommended for the switch function). If all you want to do is bump a global, how about: switch: add.l #1,_counter rts I don't see why you need to save regs or call a C routine at all. -- David Beckemeyer (david@bdt.UUCP) | "I'll forgive you Dad... If you have Beckemeyer Development Tools | a breath mint." P.O. Box 21575, Oakland, CA 94620 | Bart - "The Simpsons" UUCP: {uunet,ucbvax}!unisoft!bdt!david |