mirror of
https://github.com/cc65/cc65.git
synced 2024-12-27 00:29:31 +00:00
84b1e343b5
git-svn-id: svn://svn.cc65.org/cc65/trunk@4658 b7a2c559-68d2-44c3-8de9-860c34a00d81
34 lines
380 B
ArmAsm
34 lines
380 B
ArmAsm
;
|
|
; Stefan Haubenthal, 2008-04-29
|
|
;
|
|
|
|
.export initcwd
|
|
.import findfreeiocb
|
|
.import __cwd
|
|
.include "atari.inc"
|
|
|
|
.segment "INIT"
|
|
|
|
.proc initcwd
|
|
|
|
jsr findfreeiocb
|
|
bne oserr
|
|
lda #48
|
|
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
|