1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-11 11:30:13 +00:00

Bugfix by Oliver Schmidt

git-svn-id: svn://svn.cc65.org/cc65/trunk@3733 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2006-04-23 20:30:44 +00:00
parent e81d5ec00a
commit 6c6d450ff0

View File

@ -16,7 +16,7 @@
; call2048 : rem
; call2048:rem arg1 " arg 2 is quoted " arg3 "" arg5
;
; "call" and "rem" are entokenned; the args. are not. Leading and trailing
; "call" and "rem" are entokenned; the args. are not. Leading and trailing
; spaces outside of quotes are ignored.
; TO-DO:
@ -69,10 +69,19 @@ initmainargs:
bne :-
ldy #$01 * 2 ; Start with argv[1]
; Find the next argument.
; Find the next argument. Stop if the end of the string or a character with the
; hibit set is reached. The later is true if the string isn't already parsed by
; BASIC (as expected) but is a still unprocessed input string. In this case the
; string isn't the expected command-line at all. We found this out the hard way
; by BRUNing the program with ProDOS on a machine with a slot-based clock (like
; the Thunder Clock). ProDOS called the clock firmware which places the current
; date as BASIC input string with hibits set in the input buffer. While looking
; for the REM token we stumbled across the first '2' character ($32+$80 = $B2)
; and interpreted the rest of the date as a spurious command-line parameter.
next: lda BASIC_BUF,x
beq done
bmi done
inx
cmp #' ' ; Skip leading spaces
beq next