2015-03-14 21:47:37 +00:00
|
|
|
|
NEW
|
2019-05-02 09:52:32 +00:00
|
|
|
|
AUTO 3,1
|
2015-03-14 21:47:37 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
2020-03-10 16:42:07 +00:00
|
|
|
|
.TF bin/chtyp
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2020-05-21 12:55:49 +00:00
|
|
|
|
.INB inc/macros.i
|
|
|
|
|
.INB inc/a2osx.i
|
|
|
|
|
.INB inc/mli.i
|
|
|
|
|
.INB inc/mli.e.i
|
2017-04-03 15:35:03 +00:00
|
|
|
|
*--------------------------------------
|
2019-04-30 16:08:47 +00:00
|
|
|
|
X.ENTER.SUBDIR .EQ 0
|
2017-04-03 15:35:03 +00:00
|
|
|
|
X.COPY.TO.DEST .EQ 0
|
|
|
|
|
X.DELETE.SOURCE .EQ 0
|
2016-03-18 16:35:27 +00:00
|
|
|
|
*--------------------------------------
|
2021-07-07 14:29:10 +00:00
|
|
|
|
* Zero Page Segment, up to 32 bytes
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
|
|
|
|
.OR ZPBIN
|
|
|
|
|
ZS.START
|
|
|
|
|
|
|
|
|
|
ZPPtr1 .BS 2
|
|
|
|
|
ZPPtr2 .BS 2
|
|
|
|
|
ZPFileName .BS 2
|
|
|
|
|
ZPFileStat .BS 2
|
|
|
|
|
|
|
|
|
|
ZPFullPath .BS 2
|
|
|
|
|
|
|
|
|
|
ArgIndex .BS 1
|
|
|
|
|
HexFileType .BS 1
|
|
|
|
|
|
|
|
|
|
hSrcFullPath .BS 1
|
|
|
|
|
bPause .BS 1
|
|
|
|
|
|
|
|
|
|
bContinue .BS 1
|
|
|
|
|
bRecurse .BS 1
|
|
|
|
|
|
|
|
|
|
ZS.END .ED
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2015-11-22 22:30:06 +00:00
|
|
|
|
* File Header (16 Bytes)
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.START cld
|
|
|
|
|
jmp (.1,x)
|
2015-11-22 22:30:06 +00:00
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 BIN Layout Version 1
|
2021-07-07 14:29:10 +00:00
|
|
|
|
.DA #0 S.PS.F.EVENT
|
|
|
|
|
.DA #0
|
|
|
|
|
.DA CS.END-CS.START Code Size (without Constants)
|
|
|
|
|
.DA DS.END-DS.START Data SegmentSize
|
|
|
|
|
.DA #16 Stack Size
|
|
|
|
|
.DA #ZS.END-ZS.START Zero Page Size
|
2015-11-22 22:30:06 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
2016-03-18 16:35:27 +00:00
|
|
|
|
*--------------------------------------
|
2015-03-14 21:47:37 +00:00
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
|
|
|
|
.DA CS.DOEVENT
|
|
|
|
|
.DA CS.QUIT
|
2021-07-07 14:29:10 +00:00
|
|
|
|
*--------------------------------------
|
2016-03-18 16:35:27 +00:00
|
|
|
|
L.MSG.USAGE .DA MSG.USAGE
|
2017-04-03 21:13:46 +00:00
|
|
|
|
L.MSG.FILE .DA MSG.FILE
|
2016-03-18 16:35:27 +00:00
|
|
|
|
L.MSG.OK .DA MSG.OK
|
|
|
|
|
L.MSG.ERR .DA MSG.ERR
|
2017-10-04 15:12:03 +00:00
|
|
|
|
L.PRODOS.FT.TXT .DA PRODOS.FT.TXT
|
2015-03-14 21:47:37 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
2020-05-21 12:55:49 +00:00
|
|
|
|
CS.INIT clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-07-07 14:29:10 +00:00
|
|
|
|
CS.RUN inc ArgIndex
|
|
|
|
|
lda ArgIndex
|
2018-10-16 15:48:03 +00:00
|
|
|
|
>SYSCALL ArgV
|
2017-10-04 15:12:03 +00:00
|
|
|
|
bcs .7
|
2019-12-14 18:44:01 +00:00
|
|
|
|
|
2016-03-18 16:35:27 +00:00
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
lda (ZPPtr1)
|
2017-04-03 15:35:03 +00:00
|
|
|
|
cmp #'-'
|
|
|
|
|
bne .4
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2017-10-04 15:12:03 +00:00
|
|
|
|
ldy #1
|
2017-04-03 15:35:03 +00:00
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
|
2019-12-14 18:44:01 +00:00
|
|
|
|
ldx #OptionVars-OptionList-1
|
2017-04-03 15:35:03 +00:00
|
|
|
|
.2 cmp OptionList,x
|
|
|
|
|
beq .3
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2017-04-03 15:35:03 +00:00
|
|
|
|
dex
|
|
|
|
|
bne .2
|
2019-12-14 18:44:01 +00:00
|
|
|
|
|
2020-01-31 20:26:51 +00:00
|
|
|
|
.99 >PUSHW L.MSG.USAGE
|
|
|
|
|
>PUSHBI 0
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2018-10-21 20:54:07 +00:00
|
|
|
|
lda #E.SYN
|
2017-04-03 21:13:46 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2019-12-14 18:44:01 +00:00
|
|
|
|
|
|
|
|
|
.3 ldy OptionVars,x
|
2017-04-03 15:35:03 +00:00
|
|
|
|
lda #$80
|
2021-07-07 14:29:10 +00:00
|
|
|
|
sta $0,y
|
2020-05-21 12:55:49 +00:00
|
|
|
|
bra CS.RUN
|
2019-12-14 18:44:01 +00:00
|
|
|
|
*--------------------------------------
|
2021-07-07 14:29:10 +00:00
|
|
|
|
.4 lda HexFileType
|
2017-04-03 21:13:46 +00:00
|
|
|
|
bne .5
|
2019-12-14 18:44:01 +00:00
|
|
|
|
|
2017-04-03 21:13:46 +00:00
|
|
|
|
jsr GetHexFileType
|
|
|
|
|
bcs .99
|
2020-05-21 12:55:49 +00:00
|
|
|
|
bra CS.RUN
|
2017-04-03 21:13:46 +00:00
|
|
|
|
|
2019-12-14 18:44:01 +00:00
|
|
|
|
.5 >LDA.G hSrcBasePath
|
|
|
|
|
bne .99
|
2017-04-03 21:13:46 +00:00
|
|
|
|
|
2019-12-14 18:44:01 +00:00
|
|
|
|
>LDYA ZPPtr1
|
|
|
|
|
jsr InitSrcDirYA
|
|
|
|
|
bcs .99
|
2020-05-21 12:55:49 +00:00
|
|
|
|
bra CS.RUN
|
2019-12-14 18:44:01 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.7 >LDA.G hSrcBasePath
|
|
|
|
|
beq .99 no src ? ERROR
|
|
|
|
|
|
2021-07-07 14:29:10 +00:00
|
|
|
|
lda HexFileType
|
2017-04-03 21:13:46 +00:00
|
|
|
|
beq .99 we also have a TYPE
|
2019-12-14 18:44:01 +00:00
|
|
|
|
|
2017-10-04 15:12:03 +00:00
|
|
|
|
>LDYAI 256
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL GetMem
|
2017-10-04 15:12:03 +00:00
|
|
|
|
bcs .99
|
|
|
|
|
>STYA ZPFullPath
|
2021-07-07 14:29:10 +00:00
|
|
|
|
stx hSrcFullPath
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2020-05-21 12:55:49 +00:00
|
|
|
|
CS.RUN.LOOP ldy #S.PS.hStdIn
|
2019-03-19 16:52:08 +00:00
|
|
|
|
lda (pPS),y
|
2020-08-17 20:47:31 +00:00
|
|
|
|
>SYSCALL FEOF
|
2019-03-19 16:52:08 +00:00
|
|
|
|
bcs .99
|
2020-05-21 12:55:49 +00:00
|
|
|
|
|
2019-03-19 16:52:08 +00:00
|
|
|
|
tay
|
2020-05-21 12:55:49 +00:00
|
|
|
|
bne .1
|
|
|
|
|
|
2019-03-19 16:52:08 +00:00
|
|
|
|
>SYSCALL GetChar
|
|
|
|
|
bcs .99
|
2020-05-21 12:55:49 +00:00
|
|
|
|
|
2017-04-03 15:35:03 +00:00
|
|
|
|
cmp #$03 Ctrl-C
|
2020-05-21 12:55:49 +00:00
|
|
|
|
beq .99 Abort....
|
|
|
|
|
|
2017-04-03 15:35:03 +00:00
|
|
|
|
cmp #$13 Ctrl-S
|
2020-05-21 12:55:49 +00:00
|
|
|
|
bne .1
|
2017-04-03 15:35:03 +00:00
|
|
|
|
|
2021-07-07 14:29:10 +00:00
|
|
|
|
lda bPause
|
2017-04-03 15:35:03 +00:00
|
|
|
|
eor #$ff
|
2021-07-07 14:29:10 +00:00
|
|
|
|
sta bPause
|
2020-05-21 12:55:49 +00:00
|
|
|
|
bne CS.RUN.LOOP
|
|
|
|
|
|
2021-07-07 14:29:10 +00:00
|
|
|
|
.1 bit bPause
|
|
|
|
|
bmi CS.RUN.LOOP Pause...
|
2020-05-21 12:55:49 +00:00
|
|
|
|
*--------------------------------------
|
2017-04-03 15:35:03 +00:00
|
|
|
|
jsr GetEntry
|
2020-05-21 12:55:49 +00:00
|
|
|
|
bcs CS.RUN.LEAVE
|
|
|
|
|
|
2019-04-30 16:08:47 +00:00
|
|
|
|
jsr FilterMatch
|
2020-05-21 12:55:49 +00:00
|
|
|
|
bcs CS.RUN.NEXT no match, skip....
|
|
|
|
|
|
|
|
|
|
ldy #S.STAT.MODE+1
|
2017-04-03 15:35:03 +00:00
|
|
|
|
lda (ZPFileStat),y
|
2020-05-21 12:55:49 +00:00
|
|
|
|
and #$70
|
|
|
|
|
bne .5 REG file ?
|
2016-03-18 16:35:27 +00:00
|
|
|
|
|
2020-05-21 12:55:49 +00:00
|
|
|
|
jsr CS.RUN.FILE
|
|
|
|
|
bcc CS.RUN.NEXT
|
|
|
|
|
rts
|
2016-03-18 16:35:27 +00:00
|
|
|
|
|
2020-05-21 12:55:49 +00:00
|
|
|
|
.5 cmp /S.STAT.MODE.DIR DIR ?
|
|
|
|
|
bne .6
|
|
|
|
|
|
|
|
|
|
jsr CS.RUN.DIR
|
|
|
|
|
bcc CS.RUN.NEXT
|
2015-03-14 21:47:37 +00:00
|
|
|
|
rts
|
2020-05-21 12:55:49 +00:00
|
|
|
|
|
|
|
|
|
.6 lda #MLI.E.UNSUPST
|
2017-04-03 15:35:03 +00:00
|
|
|
|
sec
|
|
|
|
|
.99 rts
|
|
|
|
|
*--------------------------------------
|
2020-05-21 12:55:49 +00:00
|
|
|
|
CS.RUN.NEXT jsr GetNextEntry
|
|
|
|
|
bcc CS.RUN.LOOP
|
|
|
|
|
|
|
|
|
|
CS.RUN.LEAVE jsr LeaveSubDir
|
|
|
|
|
bcs .90
|
|
|
|
|
|
|
|
|
|
jsr BasePath..
|
|
|
|
|
|
|
|
|
|
jmp CS.RUN.NEXT
|
|
|
|
|
|
|
|
|
|
.90 lda #0
|
|
|
|
|
sec
|
|
|
|
|
.99 rts
|
|
|
|
|
*--------------------------------------
|
2021-07-07 14:29:10 +00:00
|
|
|
|
CS.RUN.DIR bit bRecurse
|
2020-05-21 12:55:49 +00:00
|
|
|
|
bpl .8
|
|
|
|
|
|
|
|
|
|
lda (ZPFileName)
|
|
|
|
|
cmp #'.'
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
ldy #1
|
|
|
|
|
lda (ZPFileName),y
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
cmp #'.'
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPFileName),y
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
.1 jsr CS.RUN.GetFilePath
|
|
|
|
|
|
|
|
|
|
>LDYA ZPFileName
|
|
|
|
|
jmp EnterSubDirYA
|
|
|
|
|
|
|
|
|
|
.8 clc
|
2019-10-03 06:25:27 +00:00
|
|
|
|
rts
|
2017-04-03 15:35:03 +00:00
|
|
|
|
*--------------------------------------
|
2020-05-21 12:55:49 +00:00
|
|
|
|
CS.RUN.FILE jsr FilterMatch
|
|
|
|
|
bcs .8 no match, skip....
|
|
|
|
|
|
|
|
|
|
jsr CS.RUN.GetFilePath
|
|
|
|
|
|
2020-01-31 20:26:51 +00:00
|
|
|
|
>PUSHW L.MSG.FILE
|
2017-10-04 15:12:03 +00:00
|
|
|
|
>PUSHW ZPFullPath
|
2018-08-23 15:16:20 +00:00
|
|
|
|
>PUSHBI 2
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2017-04-03 21:13:46 +00:00
|
|
|
|
bcs .9
|
2020-01-31 20:26:51 +00:00
|
|
|
|
|
2020-03-10 16:42:07 +00:00
|
|
|
|
>PUSHW ZPFullPath
|
|
|
|
|
|
2021-07-07 14:29:10 +00:00
|
|
|
|
>PUSHB HexFileType
|
2017-04-04 13:07:58 +00:00
|
|
|
|
|
|
|
|
|
>SYSCALL ChTyp
|
2017-04-03 21:13:46 +00:00
|
|
|
|
jsr CS.RUN.CheckErr
|
2020-05-21 12:55:49 +00:00
|
|
|
|
|
|
|
|
|
.8 clc
|
2017-04-03 15:35:03 +00:00
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2017-04-03 21:13:46 +00:00
|
|
|
|
CS.RUN.CheckErr bcs .1
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2017-04-03 21:13:46 +00:00
|
|
|
|
>LDYA L.MSG.OK
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PutS
|
2017-04-03 21:13:46 +00:00
|
|
|
|
rts
|
2020-05-21 12:55:49 +00:00
|
|
|
|
|
2017-04-03 21:13:46 +00:00
|
|
|
|
.1 pha
|
2020-01-31 20:26:51 +00:00
|
|
|
|
>PUSHW L.MSG.ERR
|
|
|
|
|
pla
|
|
|
|
|
pha
|
2017-04-03 21:13:46 +00:00
|
|
|
|
>PUSHA
|
2018-08-23 15:16:20 +00:00
|
|
|
|
>PUSHBI 1
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
|
|
|
|
lda bContinue
|
2018-11-28 11:39:33 +00:00
|
|
|
|
eor #$80
|
|
|
|
|
asl
|
2017-04-03 21:13:46 +00:00
|
|
|
|
pla
|
2018-11-28 11:39:33 +00:00
|
|
|
|
rts
|
2017-04-03 21:13:46 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.GetFilePath
|
2021-05-04 17:31:21 +00:00
|
|
|
|
>PUSHW ZPFullPath
|
2017-10-04 15:12:03 +00:00
|
|
|
|
>LDA.G hSrcBasePath
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL GetMemPtr
|
2017-04-03 21:13:46 +00:00
|
|
|
|
>PUSHYA
|
2017-10-04 15:12:03 +00:00
|
|
|
|
>SYSCALL StrCpy
|
2021-05-04 17:31:21 +00:00
|
|
|
|
|
|
|
|
|
>PUSHW ZPFullPath
|
2017-04-03 21:13:46 +00:00
|
|
|
|
>PUSHW ZPFileName
|
2017-10-04 15:12:03 +00:00
|
|
|
|
>SYSCALL StrCat
|
2017-04-03 21:13:46 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-04-03 15:35:03 +00:00
|
|
|
|
CS.DOEVENT sec
|
2015-03-14 21:47:37 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-04-03 15:35:03 +00:00
|
|
|
|
CS.QUIT jsr LeaveSubDir
|
|
|
|
|
bcc CS.QUIT
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2017-10-04 15:12:03 +00:00
|
|
|
|
>LDA.G hFilter
|
|
|
|
|
beq .1
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL FreeMem
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
|
|
|
|
.1 lda hSrcFullPath
|
2017-10-04 15:12:03 +00:00
|
|
|
|
beq .8
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL FreeMem
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2017-10-04 15:12:03 +00:00
|
|
|
|
.8 clc
|
2016-03-18 16:35:27 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-10-04 15:12:03 +00:00
|
|
|
|
GetHexFileType ldy #$ff
|
|
|
|
|
|
|
|
|
|
.10 iny
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
bne .10
|
2019-03-19 16:52:08 +00:00
|
|
|
|
|
2017-10-04 15:12:03 +00:00
|
|
|
|
cpy #3
|
2016-03-18 16:35:27 +00:00
|
|
|
|
bne .9
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2017-10-04 15:12:03 +00:00
|
|
|
|
lda (ZPPtr1)
|
2017-04-03 21:13:46 +00:00
|
|
|
|
cmp #'0'
|
2016-03-18 16:35:27 +00:00
|
|
|
|
bne .1
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2019-03-19 16:52:08 +00:00
|
|
|
|
ldy #1
|
2016-03-18 16:35:27 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2019-03-19 16:52:08 +00:00
|
|
|
|
jsr IsDigit16
|
2016-03-18 16:35:27 +00:00
|
|
|
|
bcs .9
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2016-03-18 16:35:27 +00:00
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
2021-07-07 14:29:10 +00:00
|
|
|
|
sta HexFileType
|
|
|
|
|
|
|
|
|
|
iny
|
2016-03-18 16:35:27 +00:00
|
|
|
|
lda (ZPPtr1),y
|
2019-03-19 16:52:08 +00:00
|
|
|
|
jsr IsDigit16
|
2016-03-18 16:35:27 +00:00
|
|
|
|
bcs .9
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
|
|
|
|
tsb HexFileType
|
|
|
|
|
* clc
|
2016-03-18 16:35:27 +00:00
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.1 ldx #0
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2016-03-18 16:35:27 +00:00
|
|
|
|
>LDYA L.PRODOS.FT.TXT
|
|
|
|
|
>STYA ZPPtr2
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2017-10-04 15:12:03 +00:00
|
|
|
|
.2 ldy #2
|
|
|
|
|
|
2016-03-18 16:35:27 +00:00
|
|
|
|
.21 lda (ZPPtr1),y
|
|
|
|
|
cmp #'a'
|
2017-10-04 15:12:03 +00:00
|
|
|
|
bcc .4
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2016-03-18 16:35:27 +00:00
|
|
|
|
cmp #'z'+1
|
2017-10-04 15:12:03 +00:00
|
|
|
|
bcs .4
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2016-03-18 16:35:27 +00:00
|
|
|
|
eor #$20
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2017-10-04 15:12:03 +00:00
|
|
|
|
.4 cmp (ZPPtr2),y
|
|
|
|
|
bne .5
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2016-03-18 16:35:27 +00:00
|
|
|
|
dey
|
2017-10-04 15:12:03 +00:00
|
|
|
|
bpl .21
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
|
|
|
|
lda PRODOS.FT.HEX,x
|
|
|
|
|
sta HexFileType
|
2015-03-14 21:47:37 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2017-10-04 15:12:03 +00:00
|
|
|
|
.5 clc
|
2016-03-18 16:35:27 +00:00
|
|
|
|
lda ZPPtr2
|
|
|
|
|
adc #3
|
|
|
|
|
sta ZPPtr2
|
2021-07-07 14:29:10 +00:00
|
|
|
|
bcc .6
|
|
|
|
|
|
|
|
|
|
inc ZPPtr2+1
|
|
|
|
|
|
|
|
|
|
.6 inx
|
|
|
|
|
cpx #PRODOS.FT.TXT-PRODOS.FT.HEX
|
2016-03-18 16:35:27 +00:00
|
|
|
|
bne .2
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2019-03-19 16:52:08 +00:00
|
|
|
|
.9 sec
|
|
|
|
|
rts
|
|
|
|
|
*---------------------------------------
|
|
|
|
|
IsDigit16 cmp #'0'
|
|
|
|
|
bcc .9
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2019-03-19 16:52:08 +00:00
|
|
|
|
cmp #'9'+1
|
|
|
|
|
bcc .8
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2019-03-19 16:52:08 +00:00
|
|
|
|
cmp #'A'
|
|
|
|
|
bcc .9
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2019-03-19 16:52:08 +00:00
|
|
|
|
cmp #'F'+1
|
|
|
|
|
bcc .1
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2019-03-19 16:52:08 +00:00
|
|
|
|
cmp #'a'
|
|
|
|
|
bcc .9
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2019-03-19 16:52:08 +00:00
|
|
|
|
cmp #'f'+1
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
eor #$20
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.1
|
2019-03-19 16:52:08 +00:00
|
|
|
|
* clc
|
|
|
|
|
sbc #'A'-11 cc so A->10 (11-CC)
|
|
|
|
|
clc
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.8 and #$0F
|
2019-03-19 16:52:08 +00:00
|
|
|
|
rts
|
2021-07-07 14:29:10 +00:00
|
|
|
|
|
2016-03-18 16:35:27 +00:00
|
|
|
|
.9 sec
|
|
|
|
|
rts
|
2017-04-03 15:35:03 +00:00
|
|
|
|
*--------------------------------------
|
2020-08-25 14:54:30 +00:00
|
|
|
|
.INB usr/src/shared/x.fileenum.s
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.END
|
2017-04-03 15:35:03 +00:00
|
|
|
|
*--------------------------------------
|
2019-12-14 18:44:01 +00:00
|
|
|
|
OptionList .AS "CRcr"
|
2017-06-25 12:04:33 +00:00
|
|
|
|
OptionVars .DA #bContinue,#bRecurse,#bContinue,#bRecurse
|
2017-04-03 15:35:03 +00:00
|
|
|
|
*--------------------------------------
|
2019-12-14 18:44:01 +00:00
|
|
|
|
MSG.USAGE .AS "Usage : CHTYP type [File *,? wildcards allowed]\r\n"
|
|
|
|
|
.AS " type : 0xx (Hexadecimal byte),SYS,TXT...\r\n"
|
2019-02-19 20:16:43 +00:00
|
|
|
|
.AS " -C : Continue on error\r\n"
|
|
|
|
|
.AZ " -R : Recurse subdirectories\r\n"
|
2018-08-23 15:16:20 +00:00
|
|
|
|
MSG.OK .AZ "[OK]"
|
2018-04-11 15:35:51 +00:00
|
|
|
|
MSG.ERR .AZ "[%h]\r\n"
|
|
|
|
|
MSG.FILE .AZ "CHTYP File:%S..."
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2021-07-07 14:29:10 +00:00
|
|
|
|
PRODOS.FT.HEX .HS 0406FAFCFDCBCCCFFF
|
2016-03-18 16:35:27 +00:00
|
|
|
|
PRODOS.FT.TXT .AS "TXT"
|
|
|
|
|
.AS "BIN"
|
2018-08-24 10:20:23 +00:00
|
|
|
|
.AS "ASM"
|
2016-03-18 16:35:27 +00:00
|
|
|
|
.AS "BAS"
|
|
|
|
|
.AS "VAR"
|
2021-07-07 14:29:10 +00:00
|
|
|
|
.AS "PIX"
|
|
|
|
|
.AS "FON"
|
|
|
|
|
.AS "PAK"
|
2016-03-18 16:35:27 +00:00
|
|
|
|
.AS "SYS"
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2016-03-18 16:35:27 +00:00
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
2021-07-07 14:29:10 +00:00
|
|
|
|
DS.START .INB usr/src/shared/x.fileenum.g
|
2020-08-17 20:47:31 +00:00
|
|
|
|
DS.END .ED
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2020-05-21 12:55:49 +00:00
|
|
|
|
SAVE usr/src/bin/chtyp.s
|
2015-03-14 21:47:37 +00:00
|
|
|
|
ASM
|