mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2024-06-24 02:29:32 +00:00
mainmem.wild.s cleanup of return codes.
This commit is contained in:
parent
aa379249a6
commit
f75d7cce86
|
@ -37,7 +37,7 @@ WILDCARD STZ :LAST
|
||||||
:WILD LDX #<MFTEMP ; Invoke SRCHBLK to look for pattern
|
:WILD LDX #<MFTEMP ; Invoke SRCHBLK to look for pattern
|
||||||
LDY #>MFTEMP ; in the directory path MFTEMP
|
LDY #>MFTEMP ; in the directory path MFTEMP
|
||||||
:AGAIN JSR SRCHBLK
|
:AGAIN JSR SRCHBLK
|
||||||
BCS :NOMATCH ; Wildcard did not match anything
|
BCC :NOMATCH ; Wildcard did not match anything
|
||||||
JSR APPMATCH ; Append MATCHBUF to MFTEMP
|
JSR APPMATCH ; Append MATCHBUF to MFTEMP
|
||||||
:NEXT LDA :LAST
|
:NEXT LDA :LAST
|
||||||
BEQ :L1
|
BEQ :L1
|
||||||
|
@ -69,7 +69,7 @@ WILDNEXT LDX MFTEMP ; Length of MFTEMP
|
||||||
:S2 DEX
|
:S2 DEX
|
||||||
BRA :L1
|
BRA :L1
|
||||||
:S1 JSR SRCHBLK
|
:S1 JSR SRCHBLK
|
||||||
BCS :NOMATCH
|
BCC :NOMATCH
|
||||||
JSR APPMATCH ; Append MATCHBUF to MFTEMP
|
JSR APPMATCH ; Append MATCHBUF to MFTEMP
|
||||||
JSR TMPtoMF ; Copy back to MOSFILE
|
JSR TMPtoMF ; Copy back to MOSFILE
|
||||||
CLC
|
CLC
|
||||||
|
@ -161,8 +161,7 @@ WILDIDX DB $00 ; Dirent idx in current block
|
||||||
|
|
||||||
* Read directory block, apply wildcard match
|
* Read directory block, apply wildcard match
|
||||||
* Inputs: directory name in XY (Pascal string)
|
* Inputs: directory name in XY (Pascal string)
|
||||||
* If there is a match, carry clear
|
* On exit: set carry if match, clear carry otherwise
|
||||||
* If no match, or any other error, returns with carry set
|
|
||||||
* Leaves the directory open to allow resumption of search.
|
* Leaves the directory open to allow resumption of search.
|
||||||
SRCHBLK LDA WILDIDX
|
SRCHBLK LDA WILDIDX
|
||||||
CMP #$F0 ; Is it a new search?
|
CMP #$F0 ; Is it a new search?
|
||||||
|
@ -189,10 +188,6 @@ SRCHBLK LDA WILDIDX
|
||||||
RTS ; .. to see if another block
|
RTS ; .. to see if another block
|
||||||
|
|
||||||
:CONT JSR SRCHBLK2 ; Handle one block
|
:CONT JSR SRCHBLK2 ; Handle one block
|
||||||
BCS :MATCH
|
|
||||||
SEC
|
|
||||||
RTS
|
|
||||||
:MATCH CLC
|
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
* Close directory, if it was open
|
* Close directory, if it was open
|
||||||
|
|
Loading…
Reference in New Issue
Block a user