]> git.sur5r.net Git - cc65/blobdiff - libsrc/atari/dosdetect.s
Some small first changes for the 'atarixl' target.
[cc65] / libsrc / atari / dosdetect.s
index 371741616e9d1c00df6d31be85f2e7a73ca2ffb8..c60ac479b4b80c5be61a5a81fc7e8eaef101af63 100644 (file)
@@ -4,50 +4,50 @@
 ; detect the DOS version we're running on
 ;
 
-       .include        "atari.inc"
-       .constructor    detect,26
-       .export         __dos_type
+        .include        "atari.inc"
+        .constructor    detect,26
+        .export         __dos_type
 
 ; ------------------------------------------------------------------------
 ; DOS type detection
 
 .segment        "INIT"
 
-detect:        lda     #ATARIDOS
-       sta     __dos_type      ; set default
-
-       lda     DOS
-       cmp     #'S'            ; SpartaDOS
-       beq     spdos
-       cmp     #'M'            ; MyDOS
-       beq     mydos
-
-       ldy     #COMTAB
-       lda     #$4C
-       cmp     (DOSVEC),y
-       bne     done
-
-       ldy     #ZCRNAME
-       cmp     (DOSVEC),y
-       bne     done
-
-       ldy     #6              ; OS/A+ has a jmp here
-       cmp     (DOSVEC),y
-       beq     done
-       lda     #OSADOS
-       .byte   $2C             ; BIT <abs>
-
-spdos: lda     #SPARTADOS
-       .byte   $2C             ; BIT <abs>
-
-mydos: lda     #MYDOS
-       sta     __dos_type
-done:  rts
+detect: lda     DOS
+        cmp     #'S'            ; SpartaDOS
+        beq     spdos
+        cmp     #'M'            ; MyDOS
+        beq     mydos
+        cmp     #'X'            ; XDOS
+        beq     xdos
+
+        lda     #$4C            ; probably default
+        ldy     #COMTAB
+        cmp     (DOSVEC),y
+        bne     done
+        ldy     #ZCRNAME
+        cmp     (DOSVEC),y
+        bne     done
+
+        ldy     #6              ; OS/A+ has a jmp here
+        cmp     (DOSVEC),y
+        beq     done
+        lda     #OSADOS
+        .byte   $2C             ; BIT <abs>
+
+spdos:  lda     #SPARTADOS
+        .byte   $2C             ; BIT <abs>
+
+mydos:  lda     #MYDOS
+        .byte   $2C             ; BIT <abs>
+
+xdos:   lda     #XDOS
+        sta     __dos_type
+done:   rts
 
 ; ------------------------------------------------------------------------
 ; Data
 
-       .bss
-
-__dos_type:    .res    1
+        .bss
 
+__dos_type:     .res    1       ; default to ATARIDOS