diff --git a/libsrc/apple2/initcwd.s b/libsrc/apple2/initcwd.s index 75224d019..03e13bcfb 100644 --- a/libsrc/apple2/initcwd.s +++ b/libsrc/apple2/initcwd.s @@ -9,14 +9,10 @@ .include "apple2.inc" .include "mli.inc" -mli_parameters: - .byte $01 ; number of parameters - .addr __cwd ; address of parameter - initcwd: ; Check for ProDOS 8 lda __dos_type - beq oserr + beq done ; Save random counter lda RNDL @@ -25,17 +21,19 @@ initcwd: pha ; Call MLI + ; We're not using mli.s' callmli because its + ; mliparam is in BSS and this will be called + ; before LC code is moved to the Language Card. + jsr $BF00 ; MLI call entry point .byte GET_PREFIX_CALL ; MLI command .addr mli_parameters ; MLI parameter ; Restore random counter - tax pla sta RNDH pla sta RNDL - txa ; Check for null prefix ldx __cwd @@ -57,6 +55,8 @@ initcwd: done: rts -oserr: lda #$01 ; "Bad system call number" - sec - rts + .rodata + +mli_parameters: + .byte $01 ; Number of parameters + .addr __cwd ; Address of parameter diff --git a/libsrc/apple2/syschdir.s b/libsrc/apple2/syschdir.s index 8afc3af0b..b3f81e2a5 100644 --- a/libsrc/apple2/syschdir.s +++ b/libsrc/apple2/syschdir.s @@ -29,7 +29,8 @@ __syschdir: bcs cleanup ; Update current working directory - jsr initcwd ; Returns with A = 0 + jsr initcwd + lda #$00 ; Cleanup name cleanup:jsr popname ; Preserves A