mirror of
https://github.com/cc65/cc65.git
synced 2024-12-27 00:29:31 +00:00
Optimize and fix comments (thanks to Oliver Schmidt)
This commit is contained in:
parent
1f68846116
commit
148be69f97
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user