From 3fd58b9068f0446c88451e33f7346ab2459fc4bc Mon Sep 17 00:00:00 2001 From: cpg Date: Tue, 16 Jul 2002 18:51:30 +0000 Subject: [PATCH] initialize __dos_type variable git-svn-id: svn://svn.cc65.org/cc65/trunk@1361 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/atari/getargs.s | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libsrc/atari/getargs.s b/libsrc/atari/getargs.s index 2badc44c2..c7eb9b41c 100644 --- a/libsrc/atari/getargs.s +++ b/libsrc/atari/getargs.s @@ -19,7 +19,7 @@ CL_SIZE = 64 ; command line buffer size SPACE = 32 ; SPACE char. .include "atari.inc" - .export getargs, argc, argv + .export getargs, argc, argv, __dos_type .export _getdefdev ; get default device (e.g. "D1:") .importzp ptr1 @@ -170,6 +170,9 @@ finargs: ; DOS type detection detect: + lda #ATARIDOS + sta __dos_type ; set default + lda DOS cmp #$53 ; "S" (SpartaDOS) beq spdos @@ -186,8 +189,13 @@ detect: ldy #6 ; OS/A+ has a jmp here cmp (DOSVEC),y 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 nordos: clc ; normal DOS (no args) detected @@ -212,6 +220,8 @@ defdev: argc: .res 2 argv: .res (1 + MAXARGS) * 2 +__dos_type: .res 1 + ; Buffer for command line / argv strings ourcl: .res CL_SIZE+1 -- 2.39.5