Implemented __syschdir on CBM. As getcwd returns a cached directory any direct access to __curunit would cause inconsistencies. Therefore __curunit was renamed to curunit to prohibit user access.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5857 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
ol.sc
2012-10-16 21:39:40 +00:00
parent 6618e08bc3
commit 8b26ed2a69
6 changed files with 151 additions and 66 deletions

View File

@@ -5,7 +5,7 @@
;
.export initcwd, devicestr
.import __curunit, __cwd
.import curunit, __cwd
.import pusha0, tosudiva0
.importzp sreg, ptr1, ptr2
@@ -16,7 +16,7 @@ initcwd:
ldx #>__cwd
sta ptr2
stx ptr2+1
lda __curunit
lda curunit
; Fall through
;------------------------------------------------------------------------------
@@ -28,11 +28,11 @@ devicestr:
jsr tosudiva0
ldy #0
lda sreg
beq :+ ; >=10
beq @L0 ; >=10
add #'0'
sta (ptr2),y
iny
: lda ptr1 ; rem
@L0: lda ptr1 ; rem
add #'0'
sta (ptr2),y
iny