Adjusted current working directory initialization on Apple and Atari.

Moving __cwd from BSS into INITBSS does of course ;-) not only impact the CBM targets but all targets with disk I/O support.

Note: Code using `__cwd-1` may trigger an ld65 range error because __cwd may end up at the very begining of a segment. As far as I see this is an ld65 bug which I'm not try to fix - at least here.
This commit is contained in:
Oliver Schmidt
2015-10-15 00:15:38 +02:00
parent 0ee9b2e446
commit 76a5a72403
16 changed files with 40 additions and 32 deletions

View File

@@ -21,13 +21,13 @@
sta ICBLH,x
jsr CIOV
bmi oserr
ldx #0 ; ATEOL -> \0
: lda __cwd,x
inx
ldx #$FF ; ATEOL -> \0
: inx
lda __cwd,x
cmp #ATEOL
bne :-
lda #0
sta __cwd-1,x
sta __cwd,x
oserr: rts
.endproc