Newsgroups: comp.sys.apple2.programmer Path: news.weeg.uiowa.edu!news.uiowa.edu!hobbes.physics.uiowa.edu!newsrelay.iastate.edu!vixen.cso.uiuc.edu!howland.reston.ans.net!cs.utexas.edu!swrinde!sgiblab!munnari.oz.au!comp.vuw.ac.nz!actrix.gen.nz!dempson From: dempson@swell.actrix.gen.nz (David Empson) Subject: Re: "Quit To" from Merlin Organization: Actrix Information Exchange Date: Sun, 23 Jan 1994 01:09:09 GMT Message-ID: References: Sender: dempson@actrix.gen.nz (David Empson) Lines: 92 In article Damin@damage.cleve.fnet.org writes: > > Anyone out there have a "Quit To" command for Merlin that will boot a ProDos > file? And if not, can you provide me with the neccessary source code to tell > System 6.01 that it should boot a ProDos program? :) I don't quite understand what you are after here. By "ProDOS file", do you mean a ProDOS-8 program? Merlin 16+ alread has a "quit to" command - two varieties. From disk commands: =pathname Launch a program, and return to Merlin when it quits. -pathname Launch a program, and return to previous application when it quits. You can use this to launch ProDOS-8 and GS/OS applications. In an application you're writing yourself, use a class 0 or class 1 GS/OS Quit call. Here is the class 0 version: jsl $E100A8 da $29 adrl quitpb quitpb adrl pathname ; Pointer to Pascal string da flags ; Flag bits Here is the class 1 version: jsl $E100A8 da $2029 adrl quitpb quitpb da 2 ; parameter count (0 to 2) adrl pathname ; Pointer to GS/OS input string da flags ; Flag bits If the 'pathname' field is zero, you will quit to the previous application. If you want to launch an application as you quit, make 'pathname' point to the name of the application to launch. The 'flags' field includes the following flags: bit 15: if set, then GS/OS will return to your application when the launched application quits. This bit should be clear if you didn't specify a pathname. bit 14: if set, your program can be restarted from memory, without being reloaded from disk (provided the memory wasn't needed for something else). bit 13: if set, prefixes 10 through 12 (standard I/O) will not be changed. If clear, they will be set to '.CONSOLE'. If in doubt, clear this bit. > Thanks..(Still in desperate need of Beneath Apple ProDos!) Why? Beneath Apple ProDOS doesn't document GS/OS in any way, and doesn't even document the extended ProDOS-8 QUIT call which allows you to launch applications. If that is what you are after, then it is documented in the ProDOS-16 manual. It is mentioned in several places in the GS/OS manual, but doesn't appear to be documented fully. If you want to launch another application (ProDOS-8 or GS/OS) when quitting from a ProDOS-8 application, use the following call. Note: this call will only work if you booted via GS/OS. It will just do a standard QUIT if you booted ProDOS-8 directly. jsr $BF00 dfb $65 da quitpb quitpb dfb 4 ; parameter count dfb $EE ; signature for 'enhanced quit' da pathname ; Pathname pointer dfb 0 da 0 The 'pathname' field should point to a Pascal string containing the pathname of the application to launch. If none of the above is exactly what you were after, try explaining it more clearly. -- David Empson dempson@swell.actrix.gen.nz Snail mail: P.O. Box 27-103, Wellington, New Zealand