mirror of
https://github.com/cc65/cc65.git
synced 2024-10-31 04:04:49 +00:00
32 lines
619 B
ArmAsm
32 lines
619 B
ArmAsm
;
|
|
; Stefan Haubenthal, 2008-04-29
|
|
;
|
|
|
|
.export initcwd
|
|
.import findfreeiocb
|
|
.import __cwd
|
|
.include "atari.inc"
|
|
|
|
.proc initcwd
|
|
|
|
jsr findfreeiocb
|
|
bne oserr
|
|
lda #GETCWD
|
|
sta ICCOM,x
|
|
lda #<__cwd
|
|
sta ICBLL,x
|
|
lda #>__cwd
|
|
sta ICBLH,x
|
|
jsr CIOV
|
|
bmi oserr
|
|
ldx #0 ; ATEOL -> \0
|
|
: lda __cwd,x
|
|
inx
|
|
cmp #ATEOL
|
|
bne :-
|
|
lda #0
|
|
sta __cwd-1,x
|
|
oserr: rts
|
|
|
|
.endproc
|