(m291) Only sort when files are present
This commit is contained in:
parent
7a7fb38dda
commit
c149d1b9e7
|
@ -388,20 +388,28 @@
|
||||||
&done NIP2 LTH POP2r JMP2r
|
&done NIP2 LTH POP2r JMP2r
|
||||||
|
|
||||||
@sort-folders ( -- )
|
@sort-folders ( -- )
|
||||||
;mem/folders DUP2 LIT2 [ 00 -lines/folders ] LDZ #01 SUB #70 SFT2 ADD2 !sort-tracks-0
|
.lines/folders LDZ ?{ JMP2r }
|
||||||
|
;mem/folders DUP2 LIT2 [ 00 -lines/folders ] LDZ #01 SUB #70 SFT2 ADD2 !sort-files
|
||||||
|
|
||||||
@sort-tracks ( -- )
|
@sort-tracks ( -- )
|
||||||
|
.lines/tracks LDZ ?{ JMP2r }
|
||||||
;mem/tracks DUP2 LIT2 [ 00 -lines/tracks ] LDZ #01 SUB #70 SFT2 ADD2
|
;mem/tracks DUP2 LIT2 [ 00 -lines/tracks ] LDZ #01 SUB #70 SFT2 ADD2
|
||||||
( >> )
|
( >> )
|
||||||
|
|
||||||
@sort-tracks-0 ( first* last* -- )
|
@sort-files ( first* last* -- )
|
||||||
SWP2 &loop GTH2k ?&ok
|
SWP2
|
||||||
POP2 POP2 JMP2r
|
&>loop ( -- )
|
||||||
&ok OVR2 OVR2 STH2k #0080 ADD2 &loop2 LTH2k ?&done
|
GTH2k ?{ POP2 POP2 JMP2r }
|
||||||
DUP2 STH2kr str-lth ?&replace
|
OVR2 OVR2 STH2k #0080 ADD2
|
||||||
!&inc
|
&>loop2 ( -- )
|
||||||
&replace POP2r STH2k &inc #0080 ADD2 !&loop2
|
LTH2k ?&done
|
||||||
&done POP2 POP2 DUP2 STH2r swap-tracks #0080 ADD2 !&loop
|
DUP2 STH2kr str-lth ?&replace
|
||||||
|
!{
|
||||||
|
&replace POP2r STH2k }
|
||||||
|
#0080 ADD2 !&>loop2
|
||||||
|
|
||||||
|
&done ( -- )
|
||||||
|
POP2 POP2 DUP2 STH2r swap-tracks #0080 ADD2 !&>loop
|
||||||
|
|
||||||
@swap-tracks ( src* dst* -- )
|
@swap-tracks ( src* dst* -- )
|
||||||
EQU2k ?&skip
|
EQU2k ?&skip
|
||||||
|
|
Loading…
Reference in New Issue