From: cpg Date: Sat, 11 Feb 2012 08:35:54 +0000 (+0000) Subject: recognize XDOS -- patch from Stefan Haubenthal X-Git-Tag: V2.14~539 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ae39e1c0affefb82ebfc10e2ac533dee2b2eab82;p=cc65 recognize XDOS -- patch from Stefan Haubenthal git-svn-id: svn://svn.cc65.org/cc65/trunk@5524 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- 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