;
-; Freddy Offenga & Christian Groessler, August 2003
+; Freddy Offenga, Stefan Haubenthal, Christian Groessler, March 2007
;
; detect the DOS version we're running on
;
.constructor detect,26
.export __dos_type
+; ------------------------------------------------------------------------
; DOS type detection
+.segment "INIT"
+
detect: lda #ATARIDOS
sta __dos_type ; set default
cmp (DOSVEC),y
beq done
lda #OSADOS
- sta __dos_type
- bne done
+ .byte $2C ; BIT <abs>
spdos: lda #SPARTADOS
- sta __dos_type
-done: rts
+ .byte $2C ; BIT <abs>
mydos: lda #MYDOS
sta __dos_type
- rts
+done: rts
+
+; ------------------------------------------------------------------------
+; Data
- .bss
+ .bss
__dos_type: .res 1