2021-03-11 08:42:14 +00:00
|
|
|
;
|
|
|
|
; Jede (jede@oric.org), 2021-02-22
|
|
|
|
;
|
|
|
|
; unsigned char _syschdir (const char* name, ...);
|
|
|
|
;
|
|
|
|
|
|
|
|
.export __syschdir
|
|
|
|
.import addysp, popax
|
|
|
|
.importzp tmp1
|
|
|
|
.import initcwd
|
|
|
|
|
|
|
|
.include "telestrat.inc"
|
|
|
|
.include "zeropage.inc"
|
2022-04-17 14:06:22 +00:00
|
|
|
|
2021-03-11 08:42:14 +00:00
|
|
|
|
|
|
|
__syschdir:
|
|
|
|
; Throw away all parameters except the name
|
|
|
|
dey
|
|
|
|
dey
|
|
|
|
jsr addysp
|
|
|
|
|
|
|
|
; Get name
|
|
|
|
jsr popax
|
2021-05-13 16:12:12 +00:00
|
|
|
|
2021-03-11 08:42:14 +00:00
|
|
|
stx tmp1
|
|
|
|
ldy tmp1
|
2022-04-17 14:06:22 +00:00
|
|
|
|
2021-03-11 08:42:14 +00:00
|
|
|
; Call telemon primitive
|
2022-04-17 14:06:22 +00:00
|
|
|
|
2021-03-11 08:42:14 +00:00
|
|
|
BRK_TELEMON(XPUTCWD)
|
|
|
|
|
|
|
|
jmp initcwd ; Update cwd
|