From ae39e1c0affefb82ebfc10e2ac533dee2b2eab82 Mon Sep 17 00:00:00 2001 From: cpg Date: Sat, 11 Feb 2012 08:35:54 +0000 Subject: [PATCH] recognize XDOS -- patch from Stefan Haubenthal git-svn-id: svn://svn.cc65.org/cc65/trunk@5524 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- asminc/atari.inc | 1 + doc/atari.sgml | 5 +++-- include/atari.h | 1 + libsrc/atari/dosdetect.s | 20 ++++++++++---------- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/asminc/atari.inc b/asminc/atari.inc index 8d84311be..912da1b54 100644 --- a/asminc/atari.inc +++ b/asminc/atari.inc @@ -1093,6 +1093,7 @@ ATARIDOS = 0 SPARTADOS = 1 OSADOS = 2 ; OS/A+ MYDOS = 3 +XDOS = 4 NODOS = 255 ;------------------------------------------------------------------------- diff --git a/doc/atari.sgml b/doc/atari.sgml index 6ab9fbdfc..44bf65671 100644 --- a/doc/atari.sgml +++ b/doc/atari.sgml @@ -96,12 +96,13 @@ header file. Atari specific functions

-The functions listed below are special for the Atari. See the for declaration and usage. +The functions and global variable listed below are special for the Atari. +See the for declaration and usage. get_ostype get_tv +_dos_type _gtia_mkcolor _getcolor _getdefdev diff --git a/include/atari.h b/include/atari.h index fe6265e36..f22479095 100644 --- a/include/atari.h +++ b/include/atari.h @@ -196,6 +196,7 @@ extern unsigned char _dos_type; /* the DOS flavour */ #define SPARTADOS 1 #define OSADOS 2 #define MYDOS 3 +#define XDOS 4 #define NODOS 255 /* Define hardware */ diff --git a/libsrc/atari/dosdetect.s b/libsrc/atari/dosdetect.s index 371741616..a87d00f7c 100644 --- a/libsrc/atari/dosdetect.s +++ b/libsrc/atari/dosdetect.s @@ -11,22 +11,20 @@ ; ------------------------------------------------------------------------ ; DOS type detection -.segment "INIT" +.segment "INIT" -detect: lda #ATARIDOS - sta __dos_type ; set default - - lda DOS +detect: lda DOS cmp #'S' ; SpartaDOS beq spdos cmp #'M' ; MyDOS beq mydos + cmp #'X' ; XDOS + beq xdos + lda #$4C ; probably default ldy #COMTAB - lda #$4C cmp (DOSVEC),y bne done - ldy #ZCRNAME cmp (DOSVEC),y bne done @@ -41,13 +39,15 @@ spdos: lda #SPARTADOS .byte $2C ; BIT mydos: lda #MYDOS + .byte $2C ; BIT + +xdos: lda #XDOS sta __dos_type done: rts ; ------------------------------------------------------------------------ ; Data - .bss - -__dos_type: .res 1 + .bss +__dos_type: .res 1 ; default to ATARIDOS -- 2.39.5