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
|
|
|
|
;
|
|
|
|
|
|
|
|
.include "atari.inc"
|
|
|
|
.constructor detect,26
|
|
|
|
.export __dos_type
|
|
|
|
|
2005-02-26 09:38:46 +00:00
|
|
|
; ------------------------------------------------------------------------
|
2003-08-12 19:56:55 +00:00
|
|
|
; DOS type detection
|
|
|
|
|
2005-02-26 09:38:46 +00:00
|
|
|
.segment "INIT"
|
|
|
|
|
2003-08-12 19:56:55 +00:00
|
|
|
detect: lda #ATARIDOS
|
|
|
|
sta __dos_type ; set default
|
|
|
|
|
|
|
|
lda DOS
|
2004-03-16 22:47:50 +00:00
|
|
|
cmp #'S' ; SpartaDOS
|
2003-08-12 19:56:55 +00:00
|
|
|
beq spdos
|
2004-03-16 22:47:50 +00:00
|
|
|
cmp #'M' ; MyDOS
|
|
|
|
beq mydos
|
2003-08-12 19:56:55 +00:00
|
|
|
|
|
|
|
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
|
2007-03-28 19:34:48 +00:00
|
|
|
.byte $2C ; BIT <abs>
|
2003-08-12 19:56:55 +00:00
|
|
|
|
|
|
|
spdos: lda #SPARTADOS
|
2007-03-28 19:34:48 +00:00
|
|
|
.byte $2C ; BIT <abs>
|
2003-08-12 19:56:55 +00:00
|
|
|
|
2004-03-16 22:47:50 +00:00
|
|
|
mydos: lda #MYDOS
|
|
|
|
sta __dos_type
|
2007-03-28 19:34:48 +00:00
|
|
|
done: rts
|
2004-03-16 22:47:50 +00:00
|
|
|
|
2005-02-26 09:38:46 +00:00
|
|
|
; ------------------------------------------------------------------------
|
|
|
|
; Data
|
|
|
|
|
|
|
|
.bss
|
2003-08-12 19:56:55 +00:00
|
|
|
|
|
|
|
__dos_type: .res 1
|
|
|
|
|