[Telestrat] chdir management (#1419)

* add syschdir

* revert read.s

* remove extra line

* Now we update __cwd

* Fix tab

* Fix another tab

* Fix tab

* Fix tab and jmp

* fix xgetcwd

* Fix comments
This commit is contained in:
jedeoric
2021-03-11 09:42:14 +01:00
committed by GitHub
parent 23fba6cc37
commit 4f26650228
4 changed files with 41 additions and 8 deletions

View File

@@ -0,0 +1,32 @@
;
; 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"
__syschdir:
; Throw away all parameters except the name
dey
dey
jsr addysp
; Get name
jsr popax
stx tmp1
ldy tmp1
; Call telemon primitive
BRK_TELEMON(XPUTCWD)
jmp initcwd ; Update cwd