mirror of
https://github.com/cc65/cc65.git
synced 2024-10-31 04:04:49 +00:00
645413f431
git-svn-id: svn://svn.cc65.org/cc65/trunk@2296 b7a2c559-68d2-44c3-8de9-860c34a00d81
44 lines
559 B
ArmAsm
44 lines
559 B
ArmAsm
;
|
|
; Freddy Offenga & Christian Groessler, August 2003
|
|
;
|
|
; detect the DOS version we're running on
|
|
;
|
|
|
|
.include "atari.inc"
|
|
.constructor detect,26
|
|
.export __dos_type
|
|
|
|
; DOS type detection
|
|
|
|
detect: lda #ATARIDOS
|
|
sta __dos_type ; set default
|
|
|
|
lda DOS
|
|
cmp #$53 ; "S" (SpartaDOS)
|
|
beq spdos
|
|
|
|
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
|
|
bne done
|
|
|
|
spdos: lda #SPARTADOS
|
|
sta __dos_type
|
|
done: rts
|
|
|
|
.bss
|
|
|
|
__dos_type: .res 1
|
|
|