]> git.sur5r.net Git - cc65/blob - libsrc/common/chdir.s
Merge remote-tracking branch 'upstream/master' into creativision
[cc65] / libsrc / common / chdir.s
1 ;
2 ; Ullrich von Bassewitz, 2003-08-12
3 ;
4 ; int __fastcall__ chdir (const char* name);
5 ;
6
7         .export         _chdir
8
9         .import         __syschdir
10         .import         __mappederrno
11
12
13 ;--------------------------------------------------------------------------
14 ; The function calls __syschdir, which must check the directory, set it, and
15 ; copy it to __cwd if it is valid. The copycwd may be used for the latter.
16
17 .proc   _chdir
18
19         jsr     __syschdir      ; Call the machine specific function
20         jmp     __mappederrno   ; Store into _oserror, set errno, return 0/-1
21
22 .endproc
23
24