2003-08-12 19:56:55 +00:00
|
|
|
;
|
2004-06-09 19:53:13 +00:00
|
|
|
; Freddy Offenga & Christian Groessler, June 2004
|
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
|
|
|
|
sta __dos_type
|
2004-06-09 19:53:13 +00:00
|
|
|
rts
|
2003-08-12 19:56:55 +00:00
|
|
|
|
|
|
|
spdos: lda #SPARTADOS
|
|
|
|
sta __dos_type
|
|
|
|
done: rts
|
|
|
|
|
2004-03-16 22:47:50 +00:00
|
|
|
mydos: lda #MYDOS
|
|
|
|
sta __dos_type
|
|
|
|
rts
|
|
|
|
|
2005-02-26 09:38:46 +00:00
|
|
|
; ------------------------------------------------------------------------
|
|
|
|
; Data
|
|
|
|
|
|
|
|
.bss
|
2003-08-12 19:56:55 +00:00
|
|
|
|
|
|
|
__dos_type: .res 1
|
|
|
|
|