[comp.sys.atari.8bit] ? HOW TO RECOGNIZE A DOS?

curzon@kaoa01.dec.com (Richard Curzon KAO4-3/7A DTN 621-2196) (07/20/87)

    Too many DOSes for the Atari 8 bit.

    I have a utility that I would like to make smart enough to run
on any DOS.  For Sparta and OSS, I would like to have it pick up the 
filename from the command line -- I have the documentation on how to
do it for Spartados, and apparently the OSS DOSes are consistent.

    However, I would like it to work with other DOSes.  If I can 
identify that the DOS loaded is not a command line DOS, the 
program will display a filename prompt.

    Only catch is, how do I identify the DOS?  Is there any reliable 
trick to identify?

    PLEASE ANSWER BY MAIL, our local mailing list is non-func at
the moment....            Thanks

				Dick Curzon
				Digital Equipment of Canada
                                PO Box 13000
                                Kanata Ontario      K2K 2A6
                                Canada.

(DEC E-NET)	KAOA01::CURZON
(UUCP)		{decvax, ucbvax, allegra}!decwrl!kaoa01.dec.com!curzon
(ARPA)		curzon%kaoa01.DEC@decwrl.ARPA

appelbau@topaz.rutgers.edu (Marc L. Appelbaum) (07/22/87)

In article <10955@decwrl.DEC.COM> curzon@kaoa01.dec.com (Richard Curzon KAO4-3/7A DTN 621-2196) writes:

>     Too many DOSes for the Atari 8 bit.
> 
>     I have a utility that I would like to make smart enough to run
> on any DOS.  For Sparta and OSS, I would like to have it pick up the 
> filename from the command line -- I have the documentation on how to
> do it for Spartados, and apparently the OSS DOSes are consistent.
> 
>     However, I would like it to work with other DOSes.  If I can 
> identify that the DOS loaded is not a command line DOS, the 
> program will display a filename prompt.
> 
>     Only catch is, how do I identify the DOS?  Is there any reliable 
> trick to identify?
> 

There is no way to identify a DOS, (that I know of, please correct me
if I'm wrong).  But you should have no trouble working with SpartaDOS
or DOS XL.  

On to passing parameters from the command line.  This can be done
easily in Action! or C.  Lets look at an Action! example (this of the
top of my head)

proc main(byte array filename)
;;;this is the main proc, it will take a filename from a command line
;;;dos
if filename(0)=0 THEN getfile(file2)
;;;if just a return was pressed go to the proc getfile and input a
filename
ELSE
;;;go on with your program.

I've used this structure in a few of my programs, and it has worked
OK.
-- 
 -Marc L. Appelbaum 				
 Arpa:appelbau@topaz.rutgers.edu                 
 Uucp:{ames, cbosgd, harvard, moss, seismo}!rutgers!topaz.rutgers.edu!appelbau
 Bitnet:appelbaum@zodiac.bitnet
 GEnie:M.APPELBAUM
 MOM's BBS:(201)-938-6906