Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!cbmvax!carolyn From: carolyn@cbmvax.cbm.UUCP (Carolyn Scheppner CATS) Newsgroups: comp.sys.amiga Subject: Re: Recent CBM upheaval Message-ID: <1800@cbmvax.cbmvax.cbm.UUCP> Date: Thu, 30-Apr-87 12:24:15 EDT Article-I.D.: cbmvax.1800 Posted: Thu Apr 30 12:24:15 1987 Date-Received: Tue, 5-May-87 04:36:34 EDT References: <11465@topaz.RUTGERS.EDU> <276@rocky.STANFORD.EDU> Reply-To: carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) Distribution: world Organization: Commodore Technology, West Chester, PA Lines: 56 Keywords: Kmart list price In article <276@rocky.STANFORD.EDU> ali@rocky.UUCP (Ali Ozer) writes: >[] >Along totally different lines, has anyone tried executing the >"littletask" example from Chapter 9 of Rob Peck's book under Manx? >I have had no luck -- I've set the littletask stack to 10000, the main >program stack to 40000, and still no luck. Seems like the littletask >can do simple things like "while(1);" and function calls to other >functions in my program, but as soon as I call an Exec function like >(FindTask()), I get a GURU. (I realize I can't call AmigaDOS functions >from a task. I just want to be able to call FindTask(), FindPort(), >and Get/PutMsg()...) This program works under Lattice anyway --- At least >the compiled version on Peck's disk does... The following is a re-posting of the sava4/geta4 inline assembler required when spawning a task (or process or interrupt handler ?) with Manx. ------------------------------------------------------------------------------------------------ (From: crunch@well.UUCP (John Draper)) I got permission from Jim Goodnough from Manx to publish the following information. Manx C has some problems when spawning tasks. It appears that the A4 register is improperly set. Below is some code that you need to add to get multi-tasking to work properly. Before calling the "AddTask" function, it is necessary to call the sava4() function which is listed below. Then, in your Task, you need to call geta4(). The code below can be included in your source or be seperately compiled and linked into your program. /*==================================================================== Get and Save A4 Regs code for Manx =====================================================================*/ #asm a4sav dc.l 0 public _sava4 _sava4 lea a4sav,a0 move.l a4,(a0) rts public _geta4 _geta4 move.l a4sav,a4 rts #endasm -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Carolyn Scheppner -- CBM >>Amiga Technical Support<< UUCP ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn PHONE 215-431-9180 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=