Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!brutus.cs.uiuc.edu!apple!dlyons From: dlyons@Apple.COM (David A. Lyons) Newsgroups: comp.sys.apple Subject: Re: Prodos 8 Quit code Message-ID: <38428@apple.Apple.COM> Date: 7 Feb 90 21:11:36 GMT References: <7660@wpi.wpi.edu> <38347@apple.Apple.COM> <7733@wpi.wpi.edu> Organization: Apple Computer Inc, Cupertino, CA Lines: 38 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.