]> git.sur5r.net Git - cc65/blobdiff - libsrc/atari/dosdetect.s
Marked files to be excluded from build.
[cc65] / libsrc / atari / dosdetect.s
index a9014fe93ab541c0612a954a1495fe9f65116524..a87d00f7ca08b9e5e6153c062e31eb0ebe3c95c3 100644 (file)
@@ -1,5 +1,5 @@
 ;
-; Freddy Offenga & Christian Groessler, June 2004
+; Freddy Offenga, Stefan Haubenthal, Christian Groessler, March 2007
 ;
 ; detect the DOS version we're running on
 ;
@@ -8,22 +8,23 @@
        .constructor    detect,26
        .export         __dos_type
 
+; ------------------------------------------------------------------------
 ; DOS type detection
 
-detect:        lda     #ATARIDOS
-       sta     __dos_type      ; set default
+.segment       "INIT"
 
-       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
@@ -32,18 +33,21 @@ detect:     lda     #ATARIDOS
        cmp     (DOSVEC),y
        beq     done
        lda     #OSADOS
-       sta     __dos_type
-       rts
+       .byte   $2C             ; BIT <abs>
 
 spdos: lda     #SPARTADOS
-       sta     __dos_type
-done:  rts
+       .byte   $2C             ; BIT <abs>
 
 mydos: lda     #MYDOS
+       .byte   $2C             ; BIT <abs>
+
+xdos:  lda     #XDOS
        sta     __dos_type
-       rts
+done:  rts
 
-       .bss
+; ------------------------------------------------------------------------
+; Data
 
-__dos_type:    .res    1
+       .bss
 
+__dos_type:    .res    1       ; default to ATARIDOS