initialize __dos_type variable
git-svn-id: svn://svn.cc65.org/cc65/trunk@1361 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -19,7 +19,7 @@ CL_SIZE = 64 ; command line buffer size
|
|||||||
SPACE = 32 ; SPACE char.
|
SPACE = 32 ; SPACE char.
|
||||||
|
|
||||||
.include "atari.inc"
|
.include "atari.inc"
|
||||||
.export getargs, argc, argv
|
.export getargs, argc, argv, __dos_type
|
||||||
.export _getdefdev ; get default device (e.g. "D1:")
|
.export _getdefdev ; get default device (e.g. "D1:")
|
||||||
.importzp ptr1
|
.importzp ptr1
|
||||||
|
|
||||||
@@ -170,6 +170,9 @@ finargs:
|
|||||||
; DOS type detection
|
; DOS type detection
|
||||||
|
|
||||||
detect:
|
detect:
|
||||||
|
lda #ATARIDOS
|
||||||
|
sta __dos_type ; set default
|
||||||
|
|
||||||
lda DOS
|
lda DOS
|
||||||
cmp #$53 ; "S" (SpartaDOS)
|
cmp #$53 ; "S" (SpartaDOS)
|
||||||
beq spdos
|
beq spdos
|
||||||
@@ -186,8 +189,13 @@ detect:
|
|||||||
ldy #6 ; OS/A+ has a jmp here
|
ldy #6 ; OS/A+ has a jmp here
|
||||||
cmp (DOSVEC),y
|
cmp (DOSVEC),y
|
||||||
beq nordos
|
beq nordos
|
||||||
|
lda #OSADOS
|
||||||
|
sta __dos_type
|
||||||
|
bne spdos1
|
||||||
|
|
||||||
spdos: sec ; SpartaDOS, OS/A+ or DOS XL
|
spdos: lda #SPARTADOS
|
||||||
|
sta __dos_type
|
||||||
|
spdos1: sec ; SpartaDOS, OS/A+ or DOS XL
|
||||||
rts
|
rts
|
||||||
|
|
||||||
nordos: clc ; normal DOS (no args) detected
|
nordos: clc ; normal DOS (no args) detected
|
||||||
@@ -212,6 +220,8 @@ defdev:
|
|||||||
argc: .res 2
|
argc: .res 2
|
||||||
argv: .res (1 + MAXARGS) * 2
|
argv: .res (1 + MAXARGS) * 2
|
||||||
|
|
||||||
|
__dos_type: .res 1
|
||||||
|
|
||||||
; Buffer for command line / argv strings
|
; Buffer for command line / argv strings
|
||||||
|
|
||||||
ourcl: .res CL_SIZE+1
|
ourcl: .res CL_SIZE+1
|
||||||
|
|||||||
Reference in New Issue
Block a user