2003-08-12 19:56:55 +00:00
|
|
|
;
|
2007-03-28 19:34:48 +00:00
|
|
|
; Freddy Offenga, Stefan Haubenthal, Christian Groessler, March 2007
|
2003-08-12 19:56:55 +00:00
|
|
|
;
|
|
|
|
; detect the DOS version we're running on
|
|
|
|
;
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.include "atari.inc"
|
2015-10-09 20:18:51 +00:00
|
|
|
.constructor detect, 26
|
2013-05-09 11:56:54 +00:00
|
|
|
.export __dos_type
|
2003-08-12 19:56:55 +00:00
|
|
|
|
2005-02-26 09:38:46 +00:00
|
|
|
; ------------------------------------------------------------------------
|
2003-08-12 19:56:55 +00:00
|
|
|
; DOS type detection
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.segment "INIT"
|
2005-02-26 09:38:46 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
detect: lda DOS
|
|
|
|
cmp #'S' ; SpartaDOS
|
|
|
|
beq spdos
|
|
|
|
cmp #'M' ; MyDOS
|
|
|
|
beq mydos
|
|
|
|
cmp #'X' ; XDOS
|
|
|
|
beq xdos
|
2003-08-12 19:56:55 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
lda #$4C ; probably default
|
|
|
|
ldy #COMTAB
|
|
|
|
cmp (DOSVEC),y
|
|
|
|
bne done
|
|
|
|
ldy #ZCRNAME
|
|
|
|
cmp (DOSVEC),y
|
|
|
|
bne done
|
2003-08-12 19:56:55 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
ldy #6 ; OS/A+ has a jmp here
|
|
|
|
cmp (DOSVEC),y
|
|
|
|
beq done
|
|
|
|
lda #OSADOS
|
|
|
|
.byte $2C ; BIT <abs>
|
2003-08-12 19:56:55 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
spdos: lda #SPARTADOS
|
|
|
|
.byte $2C ; BIT <abs>
|
2003-08-12 19:56:55 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
mydos: lda #MYDOS
|
|
|
|
.byte $2C ; BIT <abs>
|
2012-02-11 08:35:54 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
xdos: lda #XDOS
|
|
|
|
sta __dos_type
|
|
|
|
done: rts
|
2004-03-16 22:47:50 +00:00
|
|
|
|
2005-02-26 09:38:46 +00:00
|
|
|
; ------------------------------------------------------------------------
|
|
|
|
; Data
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.bss
|
2003-08-12 19:56:55 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
__dos_type: .res 1 ; default to ATARIDOS
|