mirror of
https://github.com/cc65/cc65.git
synced 2024-06-07 23:29:39 +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 "apple2.inc"
|
||||||
.include "mli.inc"
|
.include "mli.inc"
|
||||||
|
|
||||||
mli_parameters:
|
|
||||||
.byte $01 ; number of parameters
|
|
||||||
.addr __cwd ; address of parameter
|
|
||||||
|
|
||||||
initcwd:
|
initcwd:
|
||||||
; Check for ProDOS 8
|
; Check for ProDOS 8
|
||||||
lda __dos_type
|
lda __dos_type
|
||||||
beq oserr
|
beq done
|
||||||
|
|
||||||
; Save random counter
|
; Save random counter
|
||||||
lda RNDL
|
lda RNDL
|
||||||
|
@ -25,17 +21,19 @@ initcwd:
|
||||||
pha
|
pha
|
||||||
|
|
||||||
; Call MLI
|
; 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
|
jsr $BF00 ; MLI call entry point
|
||||||
.byte GET_PREFIX_CALL ; MLI command
|
.byte GET_PREFIX_CALL ; MLI command
|
||||||
.addr mli_parameters ; MLI parameter
|
.addr mli_parameters ; MLI parameter
|
||||||
|
|
||||||
; Restore random counter
|
; Restore random counter
|
||||||
tax
|
|
||||||
pla
|
pla
|
||||||
sta RNDH
|
sta RNDH
|
||||||
pla
|
pla
|
||||||
sta RNDL
|
sta RNDL
|
||||||
txa
|
|
||||||
|
|
||||||
; Check for null prefix
|
; Check for null prefix
|
||||||
ldx __cwd
|
ldx __cwd
|
||||||
|
@ -57,6 +55,8 @@ initcwd:
|
||||||
|
|
||||||
done: rts
|
done: rts
|
||||||
|
|
||||||
oserr: lda #$01 ; "Bad system call number"
|
.rodata
|
||||||
sec
|
|
||||||
rts
|
mli_parameters:
|
||||||
|
.byte $01 ; Number of parameters
|
||||||
|
.addr __cwd ; Address of parameter
|
||||||
|
|
|
@ -29,7 +29,8 @@ __syschdir:
|
||||||
bcs cleanup
|
bcs cleanup
|
||||||
|
|
||||||
; Update current working directory
|
; Update current working directory
|
||||||
jsr initcwd ; Returns with A = 0
|
jsr initcwd
|
||||||
|
lda #$00
|
||||||
|
|
||||||
; Cleanup name
|
; Cleanup name
|
||||||
cleanup:jsr popname ; Preserves A
|
cleanup:jsr popname ; Preserves A
|
||||||
|
|
Loading…
Reference in New Issue
Block a user