2015-03-14 22:47:37 +01:00
|
|
|
|
PR#3
|
2015-06-03 20:30:57 +02:00
|
|
|
|
PREFIX /A2OSX.SRC
|
2015-03-14 22:47:37 +01:00
|
|
|
|
NEW
|
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
2015-06-03 20:30:57 +02:00
|
|
|
|
.TF /A2OSX.BOOT/BIN/LS
|
2015-03-14 22:47:37 +01:00
|
|
|
|
*--------------------------------------
|
2016-10-24 17:54:43 +02:00
|
|
|
|
.INB /A2OSX.DEV/INC/MACROS.I
|
|
|
|
|
.INB /A2OSX.DEV/INC/A2OSX.I
|
2015-03-14 22:47:37 +01:00
|
|
|
|
*--------------------------------------
|
2016-10-19 17:47:53 +02:00
|
|
|
|
MAX.COL .EQ 4
|
|
|
|
|
MAX.RECURSE .EQ 8
|
|
|
|
|
*--------------------------------------
|
2015-11-22 23:30:06 +01:00
|
|
|
|
ZPPtr1 .EQ ZPBIN
|
|
|
|
|
ZPPtr2 .EQ ZPBIN+2
|
|
|
|
|
*--------------------------------------
|
2015-06-03 20:30:57 +02:00
|
|
|
|
* File Header (16 Bytes)
|
2015-03-14 22:47:37 +01:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.START cld
|
|
|
|
|
jmp (.1,x)
|
2015-06-03 20:30:57 +02:00
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 BIN Layout Version 1
|
|
|
|
|
.DA 0
|
|
|
|
|
.DA CS.END-CS.START Code Length To Relocate
|
|
|
|
|
.DA DS.END-DS.START Data Segment to Allocate
|
|
|
|
|
.DA 0
|
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
|
|
|
|
*--------------------------------------
|
2015-03-14 22:47:37 +01:00
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
|
|
|
|
.DA CS.DOEVENT
|
|
|
|
|
.DA CS.QUIT
|
2016-10-30 08:58:08 +01:00
|
|
|
|
L.MSG.DEVEXT .DA MSG.DEVEXT
|
2015-03-14 22:47:37 +01:00
|
|
|
|
L.MSG.DIR .DA MSG.DIR
|
2016-10-26 22:41:54 +02:00
|
|
|
|
L.MSG.ENTER .DA MSG.ENTER
|
2016-10-19 17:47:53 +02:00
|
|
|
|
L.MSG.DIREXT .DA MSG.DIREXT
|
2015-03-14 22:47:37 +01:00
|
|
|
|
L.MSG.FILE .DA MSG.FILE
|
2016-10-19 17:47:53 +02:00
|
|
|
|
L.MSG.FILEEXT .DA MSG.FILEEXT
|
2015-03-14 22:47:37 +01:00
|
|
|
|
L.PRODOS.FT.TXT .DA PRODOS.FT.TXT
|
2016-10-13 18:00:27 +02:00
|
|
|
|
L.STAT .DA STAT
|
|
|
|
|
L.TIME.Format .DA TIME.Format
|
2016-10-14 17:39:49 +02:00
|
|
|
|
L.TIME.Create .DA TIME.Create
|
|
|
|
|
L.TIME.Mod .DA TIME.Mod
|
2015-03-14 22:47:37 +01:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
2016-10-24 17:54:43 +02:00
|
|
|
|
CS.INIT >SYSCALL GetArgC
|
2016-10-18 17:56:06 +02:00
|
|
|
|
sta ArgCount
|
2016-08-17 08:25:58 +02:00
|
|
|
|
|
2016-10-18 17:56:06 +02:00
|
|
|
|
.1 dec ArgCount
|
2016-10-20 18:04:35 +02:00
|
|
|
|
beq .5
|
2016-10-18 17:56:06 +02:00
|
|
|
|
|
|
|
|
|
lda ArgCount
|
2016-10-24 17:54:43 +02:00
|
|
|
|
>SYSCALL GetArgA
|
2016-10-18 17:56:06 +02:00
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
|
|
|
|
|
lda (ZPPtr1)
|
|
|
|
|
cmp #2
|
2016-10-20 18:04:35 +02:00
|
|
|
|
bne .4
|
2016-10-18 17:56:06 +02:00
|
|
|
|
|
|
|
|
|
ldy #1
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
cmp #'-'
|
2016-10-20 18:04:35 +02:00
|
|
|
|
bne .4
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
2016-10-18 17:56:06 +02:00
|
|
|
|
iny
|
|
|
|
|
lda (ZPPtr1),y
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
|
|
|
|
ldx OptionList
|
|
|
|
|
|
|
|
|
|
.2 cmp OptionList,x
|
|
|
|
|
beq .3
|
|
|
|
|
dex
|
|
|
|
|
bne .2
|
2016-10-20 18:04:35 +02:00
|
|
|
|
|
|
|
|
|
lda #SYSMGR.ERRSYN
|
|
|
|
|
sec
|
|
|
|
|
rts
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
|
|
|
|
.3 ldy OptionVars-1,x
|
2016-10-18 17:56:06 +02:00
|
|
|
|
lda #$80
|
|
|
|
|
sta (pData),y
|
|
|
|
|
bra .1
|
|
|
|
|
|
2016-10-20 18:04:35 +02:00
|
|
|
|
.4 >LDYA ZPPtr1
|
|
|
|
|
jsr InitSrcDirYA
|
|
|
|
|
bcs .9
|
2016-10-18 17:56:06 +02:00
|
|
|
|
|
2016-10-20 18:04:35 +02:00
|
|
|
|
bra .1 scan for any other args
|
|
|
|
|
|
2016-10-26 22:41:54 +02:00
|
|
|
|
.5 ldy #index
|
2016-10-18 17:56:06 +02:00
|
|
|
|
lda (pData),y
|
2016-10-20 18:04:35 +02:00
|
|
|
|
bne .8
|
2016-10-18 17:56:06 +02:00
|
|
|
|
|
2016-08-28 22:48:01 +02:00
|
|
|
|
ldy #S.PS.hPREFIX
|
|
|
|
|
lda (pPs),y
|
2016-10-24 17:54:43 +02:00
|
|
|
|
>SYSCALL GetMemPtrA
|
2016-10-20 18:04:35 +02:00
|
|
|
|
jsr InitSrcDirYA
|
|
|
|
|
bcs .9
|
2016-10-18 17:56:06 +02:00
|
|
|
|
|
2016-10-20 18:04:35 +02:00
|
|
|
|
.8 lda (pPs)
|
2016-10-18 17:56:06 +02:00
|
|
|
|
ora #S.PS.F.EVENT Now accept events
|
|
|
|
|
sta (pPs)
|
|
|
|
|
|
|
|
|
|
clc
|
2016-10-20 18:04:35 +02:00
|
|
|
|
.9 rts
|
2016-08-17 08:25:58 +02:00
|
|
|
|
*--------------------------------------
|
2015-06-03 20:30:57 +02:00
|
|
|
|
CS.RUN ldy #bCANCEL
|
|
|
|
|
lda (pData),y
|
2016-10-26 22:41:54 +02:00
|
|
|
|
bmi .99
|
2015-03-14 22:47:37 +01:00
|
|
|
|
|
2016-10-26 22:41:54 +02:00
|
|
|
|
ldy #bSTOP
|
2016-10-19 17:47:53 +02:00
|
|
|
|
lda (pData),y
|
2016-10-26 22:41:54 +02:00
|
|
|
|
bmi .8
|
2016-10-28 11:37:57 +02:00
|
|
|
|
|
2016-10-26 22:41:54 +02:00
|
|
|
|
jsr GetNextEntry
|
|
|
|
|
bcs .9
|
2015-03-14 22:47:37 +01:00
|
|
|
|
|
2016-10-13 18:00:27 +02:00
|
|
|
|
ldy #hFilter
|
|
|
|
|
lda (pData),y
|
|
|
|
|
beq .4 No filter....
|
|
|
|
|
|
2016-10-24 17:54:43 +02:00
|
|
|
|
>SYSCALL GetMemPtrA
|
2016-10-13 18:00:27 +02:00
|
|
|
|
>PUSHYA
|
|
|
|
|
>PUSHW ZPPtr1
|
2016-10-24 17:54:43 +02:00
|
|
|
|
>SYSCALL PStrMatch
|
2016-10-26 22:41:54 +02:00
|
|
|
|
bcs .8 no match, skip....
|
2016-10-13 18:00:27 +02:00
|
|
|
|
|
|
|
|
|
.4 ldy #S.STAT.PRODOS.DRIVE
|
|
|
|
|
lda (ZPPtr2),y ProDOS Device ?
|
2016-10-26 22:41:54 +02:00
|
|
|
|
bne .5
|
2016-10-13 18:00:27 +02:00
|
|
|
|
|
2016-10-26 22:41:54 +02:00
|
|
|
|
ldy #S.STAT.PRODOS.TYPE
|
2016-09-23 17:19:22 +02:00
|
|
|
|
lda (ZPPtr2),y
|
|
|
|
|
cmp #$0F Directory ?
|
2016-10-13 18:00:27 +02:00
|
|
|
|
bne .6
|
|
|
|
|
|
2016-10-26 22:41:54 +02:00
|
|
|
|
jmp CS.RUN.DIR
|
|
|
|
|
.5 jmp CS.RUN.DEV
|
|
|
|
|
.6 jmp CS.RUN.FILE
|
2016-10-13 18:00:27 +02:00
|
|
|
|
|
2016-10-26 22:41:54 +02:00
|
|
|
|
.9 ldy #bLong
|
|
|
|
|
lda (pData),y
|
|
|
|
|
bmi .91
|
|
|
|
|
|
2016-10-28 11:37:57 +02:00
|
|
|
|
jsr CS.RUN.NewLine
|
|
|
|
|
bcs .99
|
2016-10-26 22:41:54 +02:00
|
|
|
|
|
|
|
|
|
.91 jsr LeaveSubDir
|
|
|
|
|
bcs .99
|
2016-10-30 19:19:43 +01:00
|
|
|
|
|
|
|
|
|
jsr BasePath..
|
|
|
|
|
|
2016-10-26 22:41:54 +02:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
2016-10-26 22:41:54 +02:00
|
|
|
|
.99 lda #0
|
|
|
|
|
sec
|
2016-10-13 18:00:27 +02:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-10-30 08:58:08 +01:00
|
|
|
|
CS.RUN.DEV ldy #bLong
|
|
|
|
|
lda (pData),y
|
|
|
|
|
bpl CS.RUN.DIR
|
|
|
|
|
|
|
|
|
|
ldy #S.STAT.PRODOS.DEVBLOCKS+1
|
2016-10-13 18:00:27 +02:00
|
|
|
|
>PUSHB (ZPPtr2),y
|
|
|
|
|
dey
|
|
|
|
|
>PUSHB (ZPPtr2),y
|
|
|
|
|
ldy #S.STAT.BLOCKS+1
|
|
|
|
|
>PUSHB (ZPPtr2),y
|
|
|
|
|
dey
|
|
|
|
|
>PUSHB (ZPPtr2),y
|
2016-10-13 08:21:16 +02:00
|
|
|
|
|
2016-10-13 18:00:27 +02:00
|
|
|
|
ldy #S.STAT.PRODOS.DRIVE
|
|
|
|
|
>PUSHB (ZPPtr2),y
|
|
|
|
|
dey SLOT
|
|
|
|
|
>PUSHB (ZPPtr2),y
|
|
|
|
|
|
2016-10-13 08:21:16 +02:00
|
|
|
|
>PUSHW ZPPtr1
|
2016-10-30 08:58:08 +01:00
|
|
|
|
>LDYA L.MSG.DEVEXT
|
2016-10-24 17:54:43 +02:00
|
|
|
|
>SYSCALL PrintFYA
|
2016-10-30 08:58:08 +01:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
ldy #bRecurse
|
|
|
|
|
lda (pData),y
|
|
|
|
|
bpl .8
|
|
|
|
|
|
|
|
|
|
>LDYA ZPPtr1
|
2016-10-30 23:23:18 +01:00
|
|
|
|
jsr EnterSubDirYA
|
|
|
|
|
bcs .9
|
|
|
|
|
jsr CS.RUN.ENTER.MSG
|
|
|
|
|
bcs .9
|
2016-10-30 08:58:08 +01:00
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
.9 rts
|
2016-10-13 18:00:27 +02:00
|
|
|
|
*--------------------------------------
|
2016-10-28 11:37:57 +02:00
|
|
|
|
CS.RUN.DIR ldy #bAllmostAll
|
|
|
|
|
lda (pData),y
|
|
|
|
|
bpl .10
|
|
|
|
|
|
|
|
|
|
ldy #1
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
cmp #'.'
|
|
|
|
|
beq .5
|
|
|
|
|
|
|
|
|
|
.10 ldy #bLong
|
2016-10-19 17:47:53 +02:00
|
|
|
|
lda (pData),y
|
2016-10-26 22:41:54 +02:00
|
|
|
|
bmi .4
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
|
|
|
|
>PUSHW ZPPtr1
|
|
|
|
|
>LDYA L.MSG.DIR
|
2016-10-24 17:54:43 +02:00
|
|
|
|
>SYSCALL PrintFYA
|
2016-10-26 22:41:54 +02:00
|
|
|
|
bcs .9
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
2016-10-25 09:14:48 +02:00
|
|
|
|
lda #80/MAX.COL-2
|
2016-10-25 08:58:15 +02:00
|
|
|
|
sec
|
|
|
|
|
sbc (ZPPtr1)
|
|
|
|
|
beq .2
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
.1 lda #' '
|
|
|
|
|
phx
|
|
|
|
|
>SYSCALL COutA
|
|
|
|
|
plx
|
2016-10-28 11:37:57 +02:00
|
|
|
|
bcs .9
|
2016-10-25 08:58:15 +02:00
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
2016-10-28 11:37:57 +02:00
|
|
|
|
.2 jsr CS.RUN.UpdateColCnt
|
2016-10-26 22:41:54 +02:00
|
|
|
|
bcc .5
|
|
|
|
|
rts
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
2016-10-26 22:41:54 +02:00
|
|
|
|
.4 jsr CS.RUN.PUSHEXTRA
|
2016-10-14 17:39:49 +02:00
|
|
|
|
|
2016-10-18 17:56:06 +02:00
|
|
|
|
ldy #S.STAT.MODE+1
|
|
|
|
|
lda (ZPPtr2),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
|
|
|
|
lda (ZPPtr2),y
|
|
|
|
|
>PUSHA File Mode
|
|
|
|
|
|
2016-10-14 17:39:49 +02:00
|
|
|
|
>PUSHW ZPPtr1
|
2016-10-19 17:47:53 +02:00
|
|
|
|
>LDYA L.MSG.DIREXT
|
2016-10-24 17:54:43 +02:00
|
|
|
|
>SYSCALL PrintFYA
|
2016-10-26 22:41:54 +02:00
|
|
|
|
bcs .9
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
2016-10-26 22:41:54 +02:00
|
|
|
|
.5 ldy #bRecurse
|
|
|
|
|
lda (pData),y
|
|
|
|
|
bpl .8
|
|
|
|
|
|
|
|
|
|
ldy #1
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
cmp #'.'
|
|
|
|
|
beq .8
|
|
|
|
|
|
2016-10-28 11:37:57 +02:00
|
|
|
|
jsr CS.RUN.NewLine
|
|
|
|
|
bcs .9
|
|
|
|
|
|
2016-10-26 22:41:54 +02:00
|
|
|
|
>LDYA ZPPtr1
|
2016-10-30 23:23:18 +01:00
|
|
|
|
jsr EnterSubDirYA
|
|
|
|
|
bcs .9
|
|
|
|
|
jsr CS.RUN.ENTER.MSG
|
|
|
|
|
bcs .9
|
2016-10-26 22:41:54 +02:00
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
.9 rts
|
2016-10-13 18:00:27 +02:00
|
|
|
|
*--------------------------------------
|
2016-10-19 17:47:53 +02:00
|
|
|
|
CS.RUN.FILE ldy #bLong
|
|
|
|
|
lda (pData),y
|
|
|
|
|
bmi .8
|
|
|
|
|
|
|
|
|
|
>PUSHW ZPPtr1
|
|
|
|
|
>LDYA L.MSG.FILE
|
2016-10-24 17:54:43 +02:00
|
|
|
|
>SYSCALL PrintFYA
|
2016-10-28 11:37:57 +02:00
|
|
|
|
bcs .9
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
2016-10-28 11:37:57 +02:00
|
|
|
|
jmp CS.RUN.UpdateColCnt
|
2016-10-19 17:47:53 +02:00
|
|
|
|
|
|
|
|
|
.8 jsr CS.RUN.PUSHEXTRA
|
2016-10-13 18:00:27 +02:00
|
|
|
|
|
|
|
|
|
lda ZPPtr2
|
|
|
|
|
clc
|
|
|
|
|
adc #S.STAT.SIZE
|
|
|
|
|
tay
|
|
|
|
|
lda ZPPtr2+1
|
|
|
|
|
adc #0
|
|
|
|
|
>PUSHYA File Size
|
|
|
|
|
|
2016-10-18 17:56:06 +02:00
|
|
|
|
ldy #S.STAT.MODE+1
|
|
|
|
|
lda (ZPPtr2),y
|
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
|
|
|
|
lda (ZPPtr2),y
|
|
|
|
|
>PUSHA File Mode
|
|
|
|
|
|
2016-10-13 18:00:27 +02:00
|
|
|
|
ldy #S.STAT.PRODOS.AUXTYPE+1
|
2016-09-26 08:18:51 +02:00
|
|
|
|
lda (ZPPtr2),y
|
2016-10-13 08:21:16 +02:00
|
|
|
|
>PUSHA
|
|
|
|
|
dey
|
|
|
|
|
lda (ZPPtr2),y
|
2016-10-13 18:00:27 +02:00
|
|
|
|
>PUSHA AuxType
|
2015-03-14 22:47:37 +01:00
|
|
|
|
|
2016-10-13 08:21:16 +02:00
|
|
|
|
dey
|
|
|
|
|
lda (ZPPtr2),y
|
2016-09-26 08:18:51 +02:00
|
|
|
|
jsr FileType2PSTR
|
2016-10-13 18:00:27 +02:00
|
|
|
|
>PUSHYA Type
|
2016-09-26 08:18:51 +02:00
|
|
|
|
|
2016-10-13 08:21:16 +02:00
|
|
|
|
>PUSHW ZPPtr1
|
2016-10-19 17:47:53 +02:00
|
|
|
|
>LDYA L.MSG.FILEEXT
|
2016-10-24 17:54:43 +02:00
|
|
|
|
>SYSCALL PrintFYA
|
2016-10-28 11:37:57 +02:00
|
|
|
|
.9 rts
|
2015-03-14 22:47:37 +01:00
|
|
|
|
*--------------------------------------
|
2016-10-19 17:47:53 +02:00
|
|
|
|
CS.RUN.PUSHEXTRA
|
2016-10-14 17:39:49 +02:00
|
|
|
|
>PUSHW L.TIME.Mod
|
|
|
|
|
>PUSHW L.TIME.Format
|
|
|
|
|
lda ZPPtr2
|
|
|
|
|
clc
|
|
|
|
|
adc #S.STAT.MTIME
|
|
|
|
|
tay
|
|
|
|
|
lda ZPPtr2+1
|
|
|
|
|
adc #0
|
|
|
|
|
>PUSHYA
|
2016-10-24 17:54:43 +02:00
|
|
|
|
>SYSCALL PStrFTime
|
2016-10-14 17:39:49 +02:00
|
|
|
|
|
|
|
|
|
>PUSHW L.TIME.Create
|
|
|
|
|
>PUSHW L.TIME.Format
|
|
|
|
|
lda ZPPtr2
|
|
|
|
|
clc
|
|
|
|
|
adc #S.STAT.CTIME
|
|
|
|
|
tay
|
|
|
|
|
lda ZPPtr2+1
|
|
|
|
|
adc #0
|
|
|
|
|
>PUSHYA
|
2016-10-24 17:54:43 +02:00
|
|
|
|
>SYSCALL PStrFTime
|
2016-10-14 17:39:49 +02:00
|
|
|
|
|
|
|
|
|
>PUSHW L.TIME.Mod ModTime
|
|
|
|
|
>PUSHW L.TIME.Create Create Time
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-10-28 11:37:57 +02:00
|
|
|
|
CS.RUN.UpdateColCnt
|
|
|
|
|
ldy #ColCount
|
|
|
|
|
lda (pData),y
|
|
|
|
|
inc
|
|
|
|
|
sta (pData),y
|
|
|
|
|
cmp #MAX.COL
|
|
|
|
|
bne CS.RUN.NewLine.8
|
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
sta (pData),y
|
|
|
|
|
bra CS.RUN.NewLine.1
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.NewLine ldy #ColCount
|
|
|
|
|
lda (pData),y
|
|
|
|
|
beq CS.RUN.NewLine.8
|
|
|
|
|
CS.RUN.NewLine.1
|
|
|
|
|
lda #13
|
|
|
|
|
>SYSCALL COutA
|
|
|
|
|
rts
|
|
|
|
|
CS.RUN.NewLine.8
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-10-30 23:23:18 +01:00
|
|
|
|
CS.RUN.ENTER.MSG
|
|
|
|
|
ldy #hBasePath
|
|
|
|
|
lda (pData),y
|
|
|
|
|
>SYSCALL GetMemPtrA
|
|
|
|
|
>PUSHYA
|
|
|
|
|
>LDYA L.MSG.ENTER
|
|
|
|
|
>SYSCALL PrintFYA
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2015-03-14 22:47:37 +01:00
|
|
|
|
CS.DOEVENT ldy #S.EVT.hDEV is Event from active IN device?
|
|
|
|
|
lda (pEvent),y
|
|
|
|
|
ldy #S.PS.hINDEV
|
2015-06-03 20:30:57 +02:00
|
|
|
|
cmp (pPs),y
|
2015-03-14 22:47:37 +01:00
|
|
|
|
bne .9
|
2015-06-03 20:30:57 +02:00
|
|
|
|
|
2015-03-14 22:47:37 +01:00
|
|
|
|
lda (pEvent)
|
|
|
|
|
and #S.EVT.F.KEY is it a KEY event?
|
|
|
|
|
beq .9
|
2015-06-03 20:30:57 +02:00
|
|
|
|
|
2015-03-14 22:47:37 +01:00
|
|
|
|
ldy #S.EVT.DATAHI is it an O or SAPPLE key ?
|
|
|
|
|
lda (pEvent),y
|
|
|
|
|
bne .9
|
2015-06-03 20:30:57 +02:00
|
|
|
|
|
2015-03-14 22:47:37 +01:00
|
|
|
|
ldy #S.EVT.DATALO
|
|
|
|
|
lda (pEvent),y
|
|
|
|
|
cmp #$03 Ctrl-C
|
|
|
|
|
bne .1
|
2015-06-03 20:30:57 +02:00
|
|
|
|
|
2015-03-14 22:47:37 +01:00
|
|
|
|
lda #$FF
|
2015-06-03 20:30:57 +02:00
|
|
|
|
ldy #bCANCEL
|
|
|
|
|
sta (pData),y
|
2015-03-14 22:47:37 +01:00
|
|
|
|
bra .8
|
2015-06-03 20:30:57 +02:00
|
|
|
|
|
2015-03-14 22:47:37 +01:00
|
|
|
|
.1 cmp #$13 Ctrl-S
|
|
|
|
|
bne .8
|
2015-06-03 20:30:57 +02:00
|
|
|
|
|
|
|
|
|
ldy #bSTOP
|
|
|
|
|
lda (pData),y
|
2015-03-14 22:47:37 +01:00
|
|
|
|
eor #$FF
|
2015-06-03 20:30:57 +02:00
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
.8 clc
|
2015-03-14 22:47:37 +01:00
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.9 sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-10-20 18:04:35 +02:00
|
|
|
|
CS.QUIT jsr LeaveSubDir
|
|
|
|
|
bcc CS.QUIT
|
2015-03-14 22:47:37 +01:00
|
|
|
|
|
2016-10-13 18:00:27 +02:00
|
|
|
|
ldy #hFilter
|
2015-06-03 20:30:57 +02:00
|
|
|
|
lda (pData),y
|
2015-03-14 22:47:37 +01:00
|
|
|
|
beq .3
|
2016-10-24 17:54:43 +02:00
|
|
|
|
>SYSCALL FreeMemA
|
2015-03-14 22:47:37 +01:00
|
|
|
|
|
2016-10-13 18:00:27 +02:00
|
|
|
|
.3 clc
|
2015-03-14 22:47:37 +01:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-09-26 08:18:51 +02:00
|
|
|
|
FileType2PSTR ldy #0
|
|
|
|
|
|
|
|
|
|
.1 cmp PRODOS.FT.HEX,y
|
2016-10-18 17:56:06 +02:00
|
|
|
|
beq .2
|
2016-09-26 08:18:51 +02:00
|
|
|
|
|
2016-10-18 17:56:06 +02:00
|
|
|
|
iny
|
|
|
|
|
cpy #PRODOS.FT.TXT-PRODOS.FT.HEX
|
2016-09-26 08:18:51 +02:00
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
pha
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
tax
|
|
|
|
|
lda HEXDIGIT,x
|
|
|
|
|
sta PRODOS.FT.DFLT+2
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
and #$0F
|
|
|
|
|
tax
|
|
|
|
|
lda HEXDIGIT,x
|
|
|
|
|
sta PRODOS.FT.DFLT+3
|
|
|
|
|
|
2016-10-18 17:56:06 +02:00
|
|
|
|
.2 tya
|
2016-09-26 08:18:51 +02:00
|
|
|
|
asl
|
|
|
|
|
asl CC
|
|
|
|
|
adc L.PRODOS.FT.TXT
|
|
|
|
|
tay
|
|
|
|
|
lda L.PRODOS.FT.TXT+1
|
|
|
|
|
adc #0
|
|
|
|
|
rts
|
2016-10-20 18:04:35 +02:00
|
|
|
|
*--------------------------------------
|
2016-10-30 23:23:18 +01:00
|
|
|
|
.INB BIN/X.FILEENUM.S
|
2016-09-26 08:18:51 +02:00
|
|
|
|
*--------------------------------------
|
2015-03-14 22:47:37 +01:00
|
|
|
|
CS.END
|
2016-10-18 17:56:06 +02:00
|
|
|
|
*--------------------------------------
|
2016-10-28 11:37:57 +02:00
|
|
|
|
OptionList >PSTR "ALR"
|
|
|
|
|
OptionVars .DA #bAllmostAll,#bLong,#bRecurse
|
2016-10-18 17:56:06 +02:00
|
|
|
|
*--------------------------------------
|
2016-10-30 08:58:08 +01:00
|
|
|
|
MSG.DEVEXT >CSTR "%15S S%d,D%d Blocks Used:%5D,Total:%5D\n"
|
2016-10-25 08:58:15 +02:00
|
|
|
|
MSG.DIR >CSTR "%S/"
|
2016-10-28 11:37:57 +02:00
|
|
|
|
MSG.ENTER >CSTR "Directory:%S\n"
|
2016-10-25 08:58:15 +02:00
|
|
|
|
MSG.DIREXT >CSTR "%16S <dir> %a %S %S\n"
|
2016-10-28 11:37:57 +02:00
|
|
|
|
MSG.FILE >CSTR "%19S"
|
2016-10-24 17:54:43 +02:00
|
|
|
|
MSG.FILEEXT >CSTR "%15S %S $%H %a %10u %S %S\n"
|
2015-03-14 22:47:37 +01:00
|
|
|
|
*--------------------------------------
|
2016-09-26 08:18:51 +02:00
|
|
|
|
PRODOS.FT.HEX .HS 0406FAFCFDE2FF
|
2016-10-24 17:54:43 +02:00
|
|
|
|
PRODOS.FT.TXT >PSTR "TXT"
|
|
|
|
|
>PSTR "BIN"
|
|
|
|
|
>PSTR "S-C"
|
|
|
|
|
>PSTR "BAS"
|
|
|
|
|
>PSTR "VAR"
|
|
|
|
|
>PSTR "ATK"
|
|
|
|
|
>PSTR "SYS"
|
|
|
|
|
PRODOS.FT.DFLT >PSTR "$ "
|
|
|
|
|
TIME.Format >PSTR "%d-%b-%y %H:%M"
|
2016-10-14 17:39:49 +02:00
|
|
|
|
TIME.Create .BS 20
|
|
|
|
|
TIME.Mod .BS 20
|
2015-03-14 22:47:37 +01:00
|
|
|
|
HEXDIGIT .AS '0123456789ABCDEF'
|
2016-10-19 17:47:53 +02:00
|
|
|
|
STAT .BS S.STAT
|
|
|
|
|
ArgCount .BS 1
|
2015-03-14 22:47:37 +01:00
|
|
|
|
*--------------------------------------
|
2015-06-03 20:30:57 +02:00
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
2015-03-14 22:47:37 +01:00
|
|
|
|
DS.START
|
2016-10-26 22:41:54 +02:00
|
|
|
|
Index .BS 1
|
|
|
|
|
hDIRs .BS MAX.RECURSE
|
|
|
|
|
hDIRENTs .BS MAX.RECURSE
|
|
|
|
|
oDIRENTs .BS MAX.RECURSE*2
|
2016-10-20 18:04:35 +02:00
|
|
|
|
hBasePath .BS 1
|
2016-10-13 18:00:27 +02:00
|
|
|
|
hFilter .BS 1
|
2015-03-14 22:47:37 +01:00
|
|
|
|
bSTOP .BS 1
|
|
|
|
|
bCANCEL .BS 1
|
2016-10-28 11:37:57 +02:00
|
|
|
|
bAllmostAll .BS 1
|
2016-10-19 17:47:53 +02:00
|
|
|
|
bLong .BS 1
|
2016-10-18 17:56:06 +02:00
|
|
|
|
bRecurse .BS 1
|
2016-10-19 17:47:53 +02:00
|
|
|
|
ColCount .BS 1
|
2015-03-14 22:47:37 +01:00
|
|
|
|
DS.END
|
2015-06-03 20:30:57 +02:00
|
|
|
|
.ED
|
2015-03-14 22:47:37 +01:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE BIN/LS.S
|
|
|
|
|
ASM
|