recognize XDOS -- patch from Stefan Haubenthal
git-svn-id: svn://svn.cc65.org/cc65/trunk@5524 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -1093,6 +1093,7 @@ ATARIDOS = 0
|
|||||||
SPARTADOS = 1
|
SPARTADOS = 1
|
||||||
OSADOS = 2 ; OS/A+
|
OSADOS = 2 ; OS/A+
|
||||||
MYDOS = 3
|
MYDOS = 3
|
||||||
|
XDOS = 4
|
||||||
NODOS = 255
|
NODOS = 255
|
||||||
|
|
||||||
;-------------------------------------------------------------------------
|
;-------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -96,12 +96,13 @@ header file.
|
|||||||
|
|
||||||
<sect1>Atari specific functions<p>
|
<sect1>Atari specific functions<p>
|
||||||
|
|
||||||
The functions listed below are special for the Atari. See the <htmlurl
|
The functions and global variable listed below are special for the Atari.
|
||||||
url="funcref.html" name="function reference"> for declaration and usage.
|
See the <htmlurl url="funcref.html" name="function reference"> for declaration and usage.
|
||||||
|
|
||||||
<itemize>
|
<itemize>
|
||||||
<item>get_ostype
|
<item>get_ostype
|
||||||
<item>get_tv
|
<item>get_tv
|
||||||
|
<item>_dos_type
|
||||||
<item>_gtia_mkcolor
|
<item>_gtia_mkcolor
|
||||||
<item>_getcolor
|
<item>_getcolor
|
||||||
<item>_getdefdev
|
<item>_getdefdev
|
||||||
|
|||||||
@@ -196,6 +196,7 @@ extern unsigned char _dos_type; /* the DOS flavour */
|
|||||||
#define SPARTADOS 1
|
#define SPARTADOS 1
|
||||||
#define OSADOS 2
|
#define OSADOS 2
|
||||||
#define MYDOS 3
|
#define MYDOS 3
|
||||||
|
#define XDOS 4
|
||||||
#define NODOS 255
|
#define NODOS 255
|
||||||
|
|
||||||
/* Define hardware */
|
/* Define hardware */
|
||||||
|
|||||||
@@ -11,22 +11,20 @@
|
|||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; DOS type detection
|
; DOS type detection
|
||||||
|
|
||||||
.segment "INIT"
|
.segment "INIT"
|
||||||
|
|
||||||
detect: lda #ATARIDOS
|
detect: lda DOS
|
||||||
sta __dos_type ; set default
|
|
||||||
|
|
||||||
lda DOS
|
|
||||||
cmp #'S' ; SpartaDOS
|
cmp #'S' ; SpartaDOS
|
||||||
beq spdos
|
beq spdos
|
||||||
cmp #'M' ; MyDOS
|
cmp #'M' ; MyDOS
|
||||||
beq mydos
|
beq mydos
|
||||||
|
cmp #'X' ; XDOS
|
||||||
|
beq xdos
|
||||||
|
|
||||||
|
lda #$4C ; probably default
|
||||||
ldy #COMTAB
|
ldy #COMTAB
|
||||||
lda #$4C
|
|
||||||
cmp (DOSVEC),y
|
cmp (DOSVEC),y
|
||||||
bne done
|
bne done
|
||||||
|
|
||||||
ldy #ZCRNAME
|
ldy #ZCRNAME
|
||||||
cmp (DOSVEC),y
|
cmp (DOSVEC),y
|
||||||
bne done
|
bne done
|
||||||
@@ -41,13 +39,15 @@ spdos: lda #SPARTADOS
|
|||||||
.byte $2C ; BIT <abs>
|
.byte $2C ; BIT <abs>
|
||||||
|
|
||||||
mydos: lda #MYDOS
|
mydos: lda #MYDOS
|
||||||
|
.byte $2C ; BIT <abs>
|
||||||
|
|
||||||
|
xdos: lda #XDOS
|
||||||
sta __dos_type
|
sta __dos_type
|
||||||
done: rts
|
done: rts
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Data
|
; Data
|
||||||
|
|
||||||
.bss
|
.bss
|
||||||
|
|
||||||
__dos_type: .res 1
|
|
||||||
|
|
||||||
|
__dos_type: .res 1 ; default to ATARIDOS
|
||||||
|
|||||||
Reference in New Issue
Block a user