]> git.sur5r.net Git - cc65/blobdiff - libsrc/atari/dosdetect.s
The spans do now contain the size of a span, no longer the end offset.
[cc65] / libsrc / atari / dosdetect.s
index d7c455f9872dd5daf06e7ae33e1aa18021259270..371741616e9d1c00df6d31be85f2e7a73ca2ffb8 100644 (file)
@@ -1,5 +1,5 @@
 ;
-; Freddy Offenga & Christian Groessler, August 2003
+; Freddy Offenga, Stefan Haubenthal, Christian Groessler, March 2007
 ;
 ; detect the DOS version we're running on
 ;
@@ -8,14 +8,19 @@
        .constructor    detect,26
        .export         __dos_type
 
+; ------------------------------------------------------------------------
 ; DOS type detection
 
+.segment        "INIT"
+
 detect:        lda     #ATARIDOS
        sta     __dos_type      ; set default
 
        lda     DOS
-       cmp     #$53            ; "S" (SpartaDOS)
+       cmp     #'S'            ; SpartaDOS
        beq     spdos
+       cmp     #'M'            ; MyDOS
+       beq     mydos
 
        ldy     #COMTAB
        lda     #$4C
@@ -30,14 +35,19 @@ detect:     lda     #ATARIDOS
        cmp     (DOSVEC),y
        beq     done
        lda     #OSADOS
-       sta     __dos_type
-       bne     done
+       .byte   $2C             ; BIT <abs>
 
 spdos: lda     #SPARTADOS
+       .byte   $2C             ; BIT <abs>
+
+mydos: lda     #MYDOS
        sta     __dos_type
 done:  rts
 
-       .bss
+; ------------------------------------------------------------------------
+; Data
+
+       .bss
 
 __dos_type:    .res    1