2004-03-11 21:54:22 +00:00
|
|
|
;
|
|
|
|
; Oliver Schmidt, 08.03.2004
|
|
|
|
;
|
|
|
|
; Identify DOS version we're running on as one of these:
|
|
|
|
;
|
2005-03-26 17:03:30 +00:00
|
|
|
; AppleDOS 3.3 - $00
|
|
|
|
; ProDOS 8 1.0.1 - $10
|
|
|
|
; ProDOS 8 1.0.2 - $10
|
|
|
|
; ProDOS 8 1.1.1 - $11
|
|
|
|
; ProDOS 8 1.2 - $12
|
|
|
|
; ProDOS 8 1.3 - $13
|
|
|
|
; ProDOS 8 1.4 - $14
|
|
|
|
; ProDOS 8 1.5 - $15
|
|
|
|
; ProDOS 8 1.6 - $16
|
|
|
|
; ProDOS 8 1.7 - $17
|
|
|
|
; ProDOS 8 1.8 - $18
|
2020-04-02 07:45:11 +00:00
|
|
|
; ProDOS 8 1.9 - $18 (!)
|
2005-03-26 17:03:30 +00:00
|
|
|
; ProDOS 8 2.0.1 - $21
|
|
|
|
; ProDOS 8 2.0.2 - $22
|
|
|
|
; ProDOS 8 2.0.3 - $23
|
2020-04-02 07:45:11 +00:00
|
|
|
; ProDOS 8 2.4.x - $24
|
2005-03-26 17:03:30 +00:00
|
|
|
;
|
2004-03-11 21:54:22 +00:00
|
|
|
|
2011-01-29 21:39:17 +00:00
|
|
|
.constructor initdostype, 25
|
2005-04-05 21:11:10 +00:00
|
|
|
.export __dos_type
|
2004-03-11 21:54:22 +00:00
|
|
|
|
2005-04-05 21:11:10 +00:00
|
|
|
.include "mli.inc"
|
2004-03-11 21:54:22 +00:00
|
|
|
|
|
|
|
; Identify DOS version according to:
|
2005-11-21 20:52:41 +00:00
|
|
|
; - Beneath Apple ProDOS, chapter 6-63
|
|
|
|
; - Apple II ProDOS 8 TechNote #23, ProDOS 8 Changes and Minutia
|
2004-03-11 21:54:22 +00:00
|
|
|
; - ProDOS TechRefMan, chapter 5.2.4
|
|
|
|
|
2016-03-06 20:26:22 +00:00
|
|
|
.segment "ONCE"
|
2005-02-26 09:34:01 +00:00
|
|
|
|
2004-03-11 21:54:22 +00:00
|
|
|
initdostype:
|
2009-09-12 06:58:20 +00:00
|
|
|
lda $BF00
|
2013-05-09 11:56:54 +00:00
|
|
|
cmp #$4C ; Is MLI present? (JMP opcode)
|
2005-04-05 21:11:10 +00:00
|
|
|
bne done
|
2013-05-09 11:56:54 +00:00
|
|
|
lda KVERSION ; ProDOS 8 kernel version
|
2005-04-05 21:11:10 +00:00
|
|
|
cmp #$10
|
|
|
|
bcs :+
|
2013-05-09 11:56:54 +00:00
|
|
|
ora #$10 ; Make high nibble match major version
|
2005-04-05 21:11:10 +00:00
|
|
|
: sta __dos_type
|
2005-03-26 17:03:30 +00:00
|
|
|
done: rts
|
2004-03-11 21:54:22 +00:00
|
|
|
|
2016-03-16 15:28:32 +00:00
|
|
|
.data
|
2004-03-11 21:54:22 +00:00
|
|
|
|
2016-03-16 15:28:32 +00:00
|
|
|
__dos_type: .byte $00
|