From: Oliver Schmidt
Date: Sun, 19 Apr 2015 19:16:43 +0000 (+0200)
Subject: Allow up 127 chars of cmdline for programs started by the loader.
X-Git-Tag: V2.15~13
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=24e902059cfaf2aa56cee6a611f86d70f0fe045d;p=cc65
Allow up 127 chars of cmdline for programs started by the loader.
---
diff --git a/libsrc/apple2/mainargs.s b/libsrc/apple2/mainargs.s
index 6b0df4ded..af29637a7 100644
--- a/libsrc/apple2/mainargs.s
+++ b/libsrc/apple2/mainargs.s
@@ -34,12 +34,12 @@
MAXARGS = 10
; ProDOS stores the filename in the second half of BASIC's input buffer, so
-; there are 128 characters left. At least 7 characters are necessary for the
-; CALLxxxx:REM so 121 characters may be used before overwriting the ProDOS
-; filename. As we don't want to put further restrictions on the command-line
-; length we reserve those 121 characters terminated by a zero.
+; there are 128 characters left. At least 1 characters is necessary for the
+; REM so 127 characters may be used before overwriting the ProDOS filename.
+; As we don't want to put further restrictions on the command-line length
+; we reserve those 127 characters terminated by a zero.
-BUF_LEN = 122
+BUF_LEN = 128
BASIC_BUF = $200
FNAM_LEN = $280
@@ -176,4 +176,4 @@ argv: .addr FNAM
.bss
-buffer: .res BUF_LEN
\ No newline at end of file
+buffer: .res BUF_LEN
diff --git a/libsrc/apple2/targetutil/loader.s b/libsrc/apple2/targetutil/loader.s
index 0173f6105..2872de1da 100644
--- a/libsrc/apple2/targetutil/loader.s
+++ b/libsrc/apple2/targetutil/loader.s
@@ -95,8 +95,8 @@ PRESS_ANY_KEY:
jmp :+
.byte $EE
.byte $EE
- .byte 65
-STARTUP:.res 65
+ .byte $80
+STARTUP:.res $80
; Reset stack
: ldx #$FF
@@ -127,7 +127,7 @@ STARTUP:.res 65
: lda STARTUP + 1,x
: sta STACK,x
dex
- bpl :--
+ bpl :--
; Provide some user feedback
lda #