[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ProSel



In article <1992Nov8.221851.18979@fawlty.towers.oz.au>, johnmac@fawlty.towers.oz.au (John MacLean) 
> Next question: Are there any launchers, including ProSel, that can do the
> same sort of thing on an 8-bit Apple //.
> This could be done by storing the data file name in some area of memory,
> such as $200 for example, and then running a .SYS program that knew to
> look for it there.
> I think I'm pushing my luck - but any takers?

The thing you're talking about is already defined - it's called the system
program startup file protocol. It only works with system programs set up for
it. Here's how you do it:

1. The first instruction must be a jmp instruction, so $2000 must contain $4C.
2. After the jmp, two $EE's are used as a signature. These are at $2003
   and $2004.
3. The next byte contains the length of the path buffer. This is at $2005.
4. Starting at $2006 is a buffer with length corresponding to the value in
   $2005. Your selector stores an ASCII string preceded by a length byte
   starting at $2006.

A good example of a system program which supports this protocol is BASIC.

Not all selectors are set up to specify a startup file. The standard quit code
does not for example. Whenever you set an application to be run from 8 bit
prosel, you can specify a startup path to be used. Command shell style program
selectors like ECP8 let you specify a path on-the-fly.
 
> John MacLean.
-- 
Randy Shackelford   cxdb14@wsuhub.uc.twsu.edu