RE: [cc65] Atari Library dosdetect.s

From: Christian Groessler <chris1groessler.org>
Date: 2007-04-02 00:22:03
On Wed, 28 Mar 2007, Shawn Jefferson wrote:

> Christian said:
> 
> >Yes, that's not really nice. But what is the exact problem if ATARIDOS is 
> >detected?
> 
> I want to exit differently based on whether or not NODOS has been detected.
> I actually thought it was working, but then had to look at the source code
> after realizing my if(_dos_type == NODOS) code was never reached.  For
> instance, in situations where no DOS was loaded, you cannot rts from your
> program and you need to make other arrangements, such as jmp $E477.

Point taken.


> If you don't think these changes are useful, then I can always look at $703
> myself, rather than looking at _dos_type.  If that's the case, maybe the
> NODOS define can be removed from atari.h too.  I realize that since this
> code is in the runtime and always linked to an Atari project, you may not
> want to introduce more code than is strictly necessary.

The Atari runtime is already the largest of all cc65 platforms, I think.
And the best way IMO to detect NODOS would be to scan the driver table 
(HATABS) for an entry for the "D" device. Which would add even more bytes.


> Perhaps a larger function, not part of the runtime, is needed to correctly
> detect all the various versions of DOS and people can then link that in if
> they want to detect those.  I've got a fairly large list of the contents of
> $700-70E from various DOSes that might help in that regard.

I think this is a good idea. The _dos_type variable then only detects 
DOSes which the runtime needs to distinguish in order to work correctly 
and support all options, and the new function could give more detailed 
information about other/no DOSes. In this case the NODOS define could be 
in fact removed, in order not to confuse people in the future. The 
new function could be part of the runtime, but not in that part which 
unconditionally gets loaded.

Could you send me your list of $700-$70E contents?

chris
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Apr 2 00:22:17 2007

This archive was generated by hypermail 2.1.8 : 2007-04-02 00:22:21 CEST