Path: utzoo!attcan!uunet!husc6!mailrus!ames!pasteur!ucbvax!UIAMVS.BITNET!AWCTTYPA From: AWCTTYPA@UIAMVS.BITNET ("David A. Lyons") Newsgroups: comp.sys.apple Subject: Multitasking GS? Message-ID: <8806131207.aa23114@SMOKE.BRL.ARPA> Date: 14 Jun 88 12:53:21 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 39 X-Unparsable-Date: Friday 10 Jun 88 10:34 PM CT >Date: Thu, 9 Jun 88 01:11:25 GMT >Reply-To: Info-Apple@BRL.ARPA >From: Doug Gwyn >Subject: Re: Multitasking GS? >It isn't really practical to use the SOFTSWITCH technique with 16-bit >programs. However, with the memory manager and loader that the GS >has, most of the basic hooks are present for reasonable multitasking. >The hard part is getting tasks to relinquish the processor so that >others have a chance to run. It's not really that big of a problem--you could do it like MultiFinder does on the Macintosh, through GetNextEvent calls (sometimes calling GetNextEvent gives another application control for a while). You'd also want to patch some Menu Manager functions to allow clicking at the right end of the menu bar to cycle to the next application. Some applications will be less standard & won't call the menu manager or maybe not even the event manager--that's OK; you can still install a routine that hooks into the keyboard microcontroller hooks and detects certain keypresses (I think). >SOFTSWITCH relies on the control-panel interrupt for manual context >switching; a 16-bit version would leave all the program memory in >place and save just the display memory and a little bit of stack. Actually it wouldn't be *necessary* to save the display, at least not for applications that use the window/menu managers, since those applications can reconstruct the display if the system asks them to (try RefreshDesktop(nil) ). If the display gets rebuilt after you use the Meltdown NDA (by Jason Harper), the multitasker could do the same thing. -- The applicatiosn could have their own stacks, too; the multitasker would just need to keep a table of the stack pointer values of the various applications. --David A. Lyons a.k.a. DAL Systems PO Box 287 | North Liberty, IA 52317 BITNET: AWCTTYPA@UIAMVS CompuServe: 72177,3233 GEnie mail: D.LYONS2