Path: utzoo!mnetor!uunet!husc6!necntc!ames!amdahl!cerebus!dalea
From: dalea@cerebus.UUCP (Dale M. Arends X5706)
Newsgroups: comp.sys.apple
Subject: Re: This ProDOS Quit code.
Message-ID: <434@cerebus.UUCP>
Date: 7 Dec 87 19:05:14 GMT
References: <8711291318.aa15019@SMOKE.BRL.ARPA> <210@dalcsug.UUCP> <871@russell.STANFORD.EDU> <217@dalcsug.UUCP>
Reply-To: dalea@cerebus.UUCP (Dale M. Arends X5706)
Followup-To: comp.sys.apple
Organization: Fujitsu America, Inc.
Lines: 41
Keywords: MLI,QUIT

In article <217@dalcsug.UUCP> mackay@dalcsug.UUCP (Daniel MacKay) writes:
[and others...]
>> Here's the generic way to quit from ProDOS:
>> 
>>        jsr $BF00	;MLI address
>>       .BYTE $65   	;or dfb $65, or whatever
>> 		        ;$65 is the MLI QUIT code
>>       .WORD qtprms      ;address of a parmeter table (lsb first)
>> 
>> qtprms: .BYTE $04,$00,$00,$00,$00,$00,$00   ;(or dfb, or whatever)
>> ...
>Thank you VERY much!  it works perfectly.  The FORTH code it translates 
>into is:
>
>: BYE CLOSE-ALL 4 PAR! $ 65 MLI.JSR ;
>
>.. so it closes all open files, drops a 4 into the ProDOS parameter list
>(why? they're all zeros anyway!!) and calls the MLI function hex 65.
>
When it was written (as an afterthought to support the Utilities and a
particular Quark product), it was decided that the parameter block would
consist of 4 items: the parameter count (4) and three words that could be
used as pointers to data (or whatever) for the quit routine to use.  This
would allow program dispatchers and the like to keep resident data areas
between program launches as well as a plethora of other possible functions.

Whether or not this capability was ever used, I don't know, but that is the
reason I put it in.  As I have been away from Apple for several years, the 
current situation is not known to me.

The preceeding historical moment was brought to you as a public service and
in no way involves Apple.


-- 
--
		Dale M. Arends  (Fujitsu America Inc., San Jose, Calif.)
		amdahl!cerebus!dalea

The opinions expressed herein do not necessarily reflect those of my employer.
They are entirely my own if they make sense and I disavow them if they don't.