[comp.sys.apple] Prodos 8 Quit code

greyelf@wpi.wpi.edu (Michael J Pender) (02/05/90)

I want to have a basic program execute an enhanced prodos quit
call to allow loading of big system programs, like Proterm.

How Do I do it?  Should the high bits of the filename be set?
Do I need to include the prefix in the pathname buffer?

I can't seem to get it to work, it keeps doing a normal
prodos quit call instead...

---
Michael J Pender Jr  Box 1942 c/o W.P.I. W.O.S. is not dead.
greyelf@wpi.bitnet   100 Institute Rd.   ...its time to get started,
greyelf@wpi.wpi.edu  Worcester, Ma 01609 there is much to be done.

dlyons@Apple.COM (David A. Lyons) (02/05/90)

In article <7660@wpi.wpi.edu> greyelf@wpi.wpi.edu (Michael J Pender) writes:
>I want to have a basic program execute an enhanced prodos quit
>call to allow loading of big system programs, like Proterm.
>
>How Do I do it?  Should the high bits of the filename be set?
>Do I need to include the prefix in the pathname buffer?
>
>I can't seem to get it to work, it keeps doing a normal
>prodos quit call instead...

The high bits of the filename should all be CLEAR.  A partial
pathname is sufficient--you don't need a full pathname, but you
can use one if you want.

You -do- need to have booted GS/OS on your machine for an enhanced
QUIT call to work.  (I believe this is clearly documented everywhere
the enhanced QUIT call is documented.)

The parameter list looks like $04, $EE, $xx, $yy, $00, $00.  If it
still doesn't work, show me some actual non-working code.
-- 

 --David A. Lyons, Apple Computer, Inc.      |   DAL Systems
   Apple II Developer Technical Support      |   P.O. Box 875
   America Online: Dave Lyons                |   Cupertino, CA 95015-0875
   GEnie: D.LYONS2 or DAVE.LYONS         CompuServe: 72177,3233
   Internet/BITNET:  dlyons@apple.com    UUCP:  ...!ames!apple!dlyons
   
   My opinions are my own, not Apple's.

greyelf@wpi.wpi.edu (Michael J Pender) (02/06/90)

In article <38347@apple.Apple.COM> dlyons@Apple.COM (David A. Lyons) writes:
>The high bits of the filename should all be CLEAR.  A partial
>pathname is sufficient--you don't need a full pathname, but you
>can use one if you want.
>
>You -do- need to have booted GS/OS on your machine for an enhanced
>QUIT call to work.  (I believe this is clearly documented everywhere
>the enhanced QUIT call is documented.)
>
I'm not using a GS.  You mean to tell me that to use the enhanced 
prodos 8 quit call, I have to have prodos 16 in memory?
How do sytem programs chain to each other then?
---
Michael J Pender Jr  Box 1942 c/o W.P.I. W.O.S. is not dead.
greyelf@wpi.bitnet   100 Institute Rd.   ...its time to get started,
greyelf@wpi.wpi.edu  Worcester, Ma 01609 there is much to be done.

dlyons@Apple.COM (David A. Lyons) (02/08/90)

In article <7733@wpi.wpi.edu> greyelf@wpi.wpi.edu (Michael J Pender) writes:
>I'm not using a GS.  You mean to tell me that to use the enhanced 
>prodos 8 quit call, I have to have prodos 16 in memory?

Yes.  (I can't guarantee that ProDOS 8 booted directly will -never- support
the enhanced QUIT call, but it certainly doesn't now, as of v1.8.)

>How do sytem programs chain to each other then?

See chapter 5 of the _ProDOS 8 Technical Reference Manual_.  Summary:
store the pathname of the next program at $280.  Close all open files.
Clear the system bitmap so that pages 0, 1, 4-7, and $BF are protected,
but all other pages are available.  Read in the next program to $2000,
and JMP to $2000.

Note that "read in the program at $2000" is a little tricky, since you
don't want to overwrite your code in the process.  This means you need
to copy a section of code down below $2000 for reading in the file and
jumping to it.  (If you put it way up close to $BF00 instead, there will
be a limit to the size of a SYS file you can chain to!  This is actually
important, since there are programs that are that long.)

Defensive programmers clean things up even more:  I put the screen
in 40 columns, do PR#0 and IN#0, full text window, NORMAL mode,
stack pointer = $FF.

>Michael J Pender Jr  Box 1942 c/o W.P.I. W.O.S. is not dead.
>greyelf@wpi.bitnet   100 Institute Rd.   ...its time to get started,
>greyelf@wpi.wpi.edu  Worcester, Ma 01609 there is much to be done.
-- 

 --David A. Lyons, Apple Computer, Inc.      |   DAL Systems
   Apple II Developer Technical Support      |   P.O. Box 875
   America Online: Dave Lyons                |   Cupertino, CA 95015-0875
   GEnie: D.LYONS2 or DAVE.LYONS         CompuServe: 72177,3233
   Internet/BITNET:  dlyons@apple.com    UUCP:  ...!ames!apple!dlyons
   
   My opinions are my own, not Apple's.

tomk@pro-grouch.cts.com (Tom Kelly) (02/09/90)

In-Reply-To: message from greyelf@wpi.wpi.edu

If you want a Basic (language) program to do a enhanced quit, I can't help.
If it can be a SYS file,  you might try Squirt.
It is what I'm using.

UUCP: crash!pro-grouch!tomk
ARPA: crash!pro-grouch!tomk@nosc.mil