2015-03-14 21:47:37 +00:00
|
|
|
|
NEW
|
2018-11-17 17:17:13 +00:00
|
|
|
|
PREFIX
|
2017-12-22 21:24:30 +00:00
|
|
|
|
AUTO 4,1
|
2015-03-14 21:47:37 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
2018-07-23 15:28:42 +00:00
|
|
|
|
.TF BIN/LSDEV
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-23 15:28:42 +00:00
|
|
|
|
.INB INC/MACROS.I
|
2018-10-02 15:52:30 +00:00
|
|
|
|
.INB INC/MLI.I
|
2018-07-23 15:28:42 +00:00
|
|
|
|
.INB INC/A2OSX.I
|
2018-11-19 07:43:00 +00:00
|
|
|
|
.INB INC/KERNEL.I
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2019-01-04 13:17:31 +00:00
|
|
|
|
.DUMMY
|
|
|
|
|
.OR ZPBIN
|
|
|
|
|
ZS.START
|
|
|
|
|
ZPFDPtr .BS 2
|
2019-05-06 15:38:25 +00:00
|
|
|
|
Index .BS 1
|
2019-01-04 13:17:31 +00:00
|
|
|
|
ZS.END
|
|
|
|
|
.ED
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
* File Header (16 Bytes)
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.START cld
|
|
|
|
|
jmp (.1,x)
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 BIN Layout Version 1
|
2019-01-04 13:17:31 +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
|
2019-05-06 15:38:25 +00:00
|
|
|
|
.DA #64 Stack Size
|
2019-01-04 13:17:31 +00:00
|
|
|
|
.DA #ZS.END-ZS.START Zero Page Size
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
2019-10-03 06:25:27 +00:00
|
|
|
|
*--------------------------------------
|
2015-03-14 21:47:37 +00:00
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
|
|
|
|
.DA CS.EVENT
|
|
|
|
|
.DA CS.QUIT
|
|
|
|
|
L.MSG0 .DA MSG0
|
|
|
|
|
L.MSG1 .DA MSG1
|
2018-10-24 15:36:45 +00:00
|
|
|
|
L.MSG2.ERR .DA MSG2.ERR
|
2018-08-24 10:20:23 +00:00
|
|
|
|
L.MSG2 .DA MSG2
|
2017-03-20 16:54:27 +00:00
|
|
|
|
L.MSG2.C .DA MSG2.C
|
|
|
|
|
L.MSG2.B .DA MSG2.B
|
2018-11-19 07:43:00 +00:00
|
|
|
|
L.MSG3 .DA MSG3
|
|
|
|
|
L.MSG4 .DA MSG4
|
|
|
|
|
L.FD.T .DA FD.T.REG
|
|
|
|
|
.DA FD.T.DIR
|
|
|
|
|
.DA FD.T.CDEV
|
|
|
|
|
.DA FD.T.BDEV
|
|
|
|
|
.DA FD.T.LNK
|
|
|
|
|
.DA FD.T.DSOCK
|
|
|
|
|
.DA FD.T.SSOCK
|
|
|
|
|
.DA FD.T.PIPE
|
2015-03-14 21:47:37 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
2017-01-12 17:43:45 +00:00
|
|
|
|
CS.INIT clc
|
2016-11-24 17:00:03 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2019-05-06 15:38:25 +00:00
|
|
|
|
CS.RUN jsr DumpDev
|
2018-11-19 07:43:00 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
jsr DumpNod
|
|
|
|
|
bcs .9
|
|
|
|
|
.8 lda #0 tell TSKMGR that all done ok, but
|
|
|
|
|
sec we do not want to stay in memory
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DumpDev >LDYA L.MSG0
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PutS
|
2018-07-19 15:33:55 +00:00
|
|
|
|
|
2019-05-06 15:38:25 +00:00
|
|
|
|
ldx #1
|
|
|
|
|
stx Index
|
|
|
|
|
.1 lda Dev.Table-1,x
|
2019-01-13 13:10:14 +00:00
|
|
|
|
sta ZPFDPtr
|
2019-02-27 15:00:56 +00:00
|
|
|
|
lda Dev.Table,x
|
2019-01-13 13:10:14 +00:00
|
|
|
|
sta ZPFDPtr+1
|
|
|
|
|
beq .8
|
2018-11-19 07:43:00 +00:00
|
|
|
|
jsr DumpDevFD
|
2017-03-20 16:54:27 +00:00
|
|
|
|
bcs .9
|
2018-08-08 15:13:37 +00:00
|
|
|
|
|
2019-05-06 12:58:15 +00:00
|
|
|
|
ldy #DEV.DIB+S.DIB-1
|
|
|
|
|
ldx #S.DIB-1
|
|
|
|
|
.2 lda BLANK.DIB,x
|
|
|
|
|
sta (pData),y
|
|
|
|
|
dey
|
|
|
|
|
dex
|
|
|
|
|
bpl .2
|
2020-02-16 20:45:16 +00:00
|
|
|
|
|
|
|
|
|
>PUSHB Index
|
2018-07-19 15:33:55 +00:00
|
|
|
|
>PUSHEA.G DEV.DIB
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL GetDevStatus
|
2018-10-24 15:36:45 +00:00
|
|
|
|
bcc .6
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
|
|
|
|
pha
|
|
|
|
|
>PUSHW L.MSG2.ERR
|
|
|
|
|
pla
|
2018-10-24 15:36:45 +00:00
|
|
|
|
>PUSHA
|
2019-01-13 13:10:14 +00:00
|
|
|
|
>PUSHBI 1
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2017-03-20 16:54:27 +00:00
|
|
|
|
bcs .9
|
2019-05-06 15:38:25 +00:00
|
|
|
|
|
2018-10-24 15:36:45 +00:00
|
|
|
|
bra .7
|
2018-11-19 07:43:00 +00:00
|
|
|
|
.6 jsr DumpDevDIB
|
2018-07-19 15:33:55 +00:00
|
|
|
|
|
2019-05-06 15:38:25 +00:00
|
|
|
|
.7 inc Index
|
|
|
|
|
inc index
|
|
|
|
|
|
|
|
|
|
ldx Index
|
|
|
|
|
cpx #K.DEV.MAX*2+1
|
2017-03-20 16:54:27 +00:00
|
|
|
|
bne .1
|
2018-11-19 07:43:00 +00:00
|
|
|
|
|
2019-01-13 13:10:14 +00:00
|
|
|
|
.8 clc
|
2018-01-15 06:50:44 +00:00
|
|
|
|
.9 rts
|
2017-03-20 16:54:27 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-14 07:21:56 +00:00
|
|
|
|
DumpDevFD >PUSHW L.MSG1
|
|
|
|
|
|
|
|
|
|
>PUSHB Index
|
|
|
|
|
|
|
|
|
|
>PUSHB (ZPFDPtr) S.FD.T
|
2017-01-25 21:46:40 +00:00
|
|
|
|
|
2019-01-13 13:10:14 +00:00
|
|
|
|
lda ZPFDPtr
|
|
|
|
|
clc
|
|
|
|
|
adc #S.FD.DEV
|
|
|
|
|
tay
|
|
|
|
|
lda ZPFDPtr+1
|
|
|
|
|
adc /S.FD.DEV
|
2017-03-15 16:44:15 +00:00
|
|
|
|
>PUSHYA
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.FD.DEV.DRVPTR+1
|
|
|
|
|
>PUSHB (ZPFDPtr),y
|
2018-10-24 15:36:45 +00:00
|
|
|
|
|
2020-02-14 07:21:56 +00:00
|
|
|
|
dey
|
|
|
|
|
>PUSHB (ZPFDPtr),y
|
|
|
|
|
|
2018-10-24 15:36:45 +00:00
|
|
|
|
>PUSHBI 6
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2017-03-20 16:54:27 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-14 07:21:56 +00:00
|
|
|
|
DumpDevDIB >PUSHW L.MSG2
|
|
|
|
|
|
2018-07-19 15:33:55 +00:00
|
|
|
|
>LDA.G DEV.DIB+S.DIB.S
|
2018-07-18 15:30:42 +00:00
|
|
|
|
|
|
|
|
|
ldy #DEV.SFLAGS+7
|
|
|
|
|
ldx #7
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2018-08-24 10:20:23 +00:00
|
|
|
|
.1 lsr
|
2018-07-18 15:30:42 +00:00
|
|
|
|
pha
|
|
|
|
|
lda #'-'
|
2018-08-24 10:20:23 +00:00
|
|
|
|
bcc .2
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
lda MSG.SFLAGS,x
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2018-08-24 10:20:23 +00:00
|
|
|
|
.2 sta (pData),y
|
2018-07-18 15:30:42 +00:00
|
|
|
|
pla
|
|
|
|
|
dey
|
|
|
|
|
dex
|
2018-08-24 10:20:23 +00:00
|
|
|
|
bpl .1
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>PUSHEA.G DEV.SFLAGS
|
2020-02-14 07:21:56 +00:00
|
|
|
|
>PUSHB.G DEV.DIB+S.DIB.T
|
|
|
|
|
>PUSHB.G DEV.DIB+S.DIB.ST
|
|
|
|
|
>PUSHEA.G DEV.DIB+S.DIB.IDS
|
|
|
|
|
>PUSHB.G DEV.DIB+S.DIB.VERSION
|
|
|
|
|
>PUSHB.G DEV.DIB+S.DIB.VERSION+1
|
|
|
|
|
|
2018-08-24 10:20:23 +00:00
|
|
|
|
>PUSHBI 8
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2018-08-24 10:20:23 +00:00
|
|
|
|
bcs .9
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2018-07-19 15:33:55 +00:00
|
|
|
|
>LDA.G DEV.DIB+S.DIB.S
|
2018-08-24 10:20:23 +00:00
|
|
|
|
bpl .4 char device...
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
|
|
|
|
>PUSHW L.MSG2.B
|
|
|
|
|
|
2018-08-24 10:20:23 +00:00
|
|
|
|
>PUSHBI 0
|
|
|
|
|
>PUSHB.G DEV.DIB+S.DIB.SIZE+2
|
|
|
|
|
>PUSHB.G DEV.DIB+S.DIB.SIZE+1
|
|
|
|
|
>PUSHB.G DEV.DIB+S.DIB.SIZE
|
|
|
|
|
>PUSHBI 4
|
2018-07-19 15:33:55 +00:00
|
|
|
|
bra .8
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
|
|
|
|
.4 >PUSHW L.MSG2.C
|
|
|
|
|
>PUSHBI 0
|
|
|
|
|
|
2020-02-28 07:21:46 +00:00
|
|
|
|
.8 >SYSCALL PrintF
|
2018-08-24 10:20:23 +00:00
|
|
|
|
.9 rts
|
2018-07-18 15:30:42 +00:00
|
|
|
|
*--------------------------------------
|
2018-11-19 07:43:00 +00:00
|
|
|
|
DumpNod >LDYA L.MSG3
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PutS
|
2018-11-19 07:43:00 +00:00
|
|
|
|
|
2019-05-06 15:38:25 +00:00
|
|
|
|
ldx #2
|
|
|
|
|
stx Index
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2019-05-06 15:38:25 +00:00
|
|
|
|
.1 lda Nod.Table.hPath-2,x
|
2018-11-19 07:43:00 +00:00
|
|
|
|
beq .7
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
|
|
|
|
>PUSHW L.MSG4
|
|
|
|
|
|
|
|
|
|
lda Index
|
|
|
|
|
>PUSHA
|
|
|
|
|
|
|
|
|
|
tax
|
|
|
|
|
lda Nod.Table.hFD-2,x
|
|
|
|
|
>PUSHA
|
|
|
|
|
|
2019-05-06 15:38:25 +00:00
|
|
|
|
ldx Index
|
2019-02-27 15:00:56 +00:00
|
|
|
|
lda Nod.Table.hFD-2,x
|
2018-11-19 07:43:00 +00:00
|
|
|
|
>SYSCALL GetMemPtr
|
|
|
|
|
>STYA ZPFDPtr
|
|
|
|
|
lda (ZPFDPtr)
|
|
|
|
|
tax
|
|
|
|
|
>PUSHW L.FD.T,x
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
|
|
|
|
ldx index
|
|
|
|
|
lda Nod.Table.hPath-2,x
|
|
|
|
|
>SYSCALL GetMemPtr
|
|
|
|
|
>PUSHYA
|
2018-11-19 07:43:00 +00:00
|
|
|
|
>PUSHBI 6
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2019-05-06 15:38:25 +00:00
|
|
|
|
.7 inc index
|
|
|
|
|
|
|
|
|
|
ldx index
|
|
|
|
|
cpx #K.NOD.MAX+2
|
2018-11-19 07:43:00 +00:00
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2017-01-15 20:51:20 +00:00
|
|
|
|
CS.EVENT sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-10-17 06:21:04 +00:00
|
|
|
|
CS.QUIT clc
|
2015-03-14 21:47:37 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-11-24 17:00:03 +00:00
|
|
|
|
CS.END
|
2019-02-26 16:50:42 +00:00
|
|
|
|
MSG0 .AZ "hDev Tp Name Addr. Status Typ/Sub IDString Version Size (BLK)"
|
|
|
|
|
MSG1 .AZ "%03d %h %12s $%H "
|
2018-10-24 15:36:45 +00:00
|
|
|
|
MSG2.ERR .AZ "Device Error : $%h\r\n"
|
2018-08-24 10:20:23 +00:00
|
|
|
|
MSG2 .AZ "%s $%h/$%h %16S %03d.%03d "
|
2018-10-24 15:36:45 +00:00
|
|
|
|
MSG2.B .AZ "%10u\r\n"
|
|
|
|
|
MSG2.C .AZ "n/a\r\n"
|
2017-10-06 15:25:14 +00:00
|
|
|
|
MSG.SFLAGS .AS "BWRLNEIO"
|
2018-11-19 07:43:00 +00:00
|
|
|
|
*--------------------------------------
|
2019-02-27 15:00:56 +00:00
|
|
|
|
MSG3 .AZ "hNod hFD Type Filepath"
|
|
|
|
|
MSG4 .AZ "%03d $%h %5s %s\r\n"
|
2018-11-19 07:43:00 +00:00
|
|
|
|
FD.T.REG .AZ "REG"
|
|
|
|
|
FD.T.DIR .AZ "DIR"
|
|
|
|
|
FD.T.CDEV .AZ "CDEV"
|
|
|
|
|
FD.T.BDEV .AZ "BDEV"
|
|
|
|
|
FD.T.LNK .AZ "LNK"
|
|
|
|
|
FD.T.DSOCK .AZ "DSOCK"
|
|
|
|
|
FD.T.SSOCK .AZ "SSOCK"
|
|
|
|
|
FD.T.PIPE .AZ "PIPE"
|
2019-05-06 12:58:15 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
BLANK.DIB .DA #0 #S.DIB.S.BLOCK+S.DIB.S.WRITE+S.DIB.S.READ
|
|
|
|
|
.BS 3
|
|
|
|
|
>PSTR "(No IDS String!)"
|
|
|
|
|
.DA #0 #S.DIB.T.PRODOS
|
|
|
|
|
.DA #0
|
|
|
|
|
.DA 0 K.VER
|
2016-11-24 17:00:03 +00:00
|
|
|
|
*--------------------------------------
|
2017-09-21 15:29:45 +00:00
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
|
|
|
|
DS.START
|
2018-07-19 15:33:55 +00:00
|
|
|
|
DEV.DIB .BS S.DIB
|
2017-09-21 15:29:45 +00:00
|
|
|
|
DEV.SFLAGS .BS 9
|
|
|
|
|
DS.END
|
|
|
|
|
.ED
|
|
|
|
|
*--------------------------------------
|
2015-03-14 21:47:37 +00:00
|
|
|
|
MAN
|
2018-11-17 17:17:13 +00:00
|
|
|
|
SAVE USR/SRC/BIN/LSDEV.S
|
2015-03-14 21:47:37 +00:00
|
|
|
|
ASM
|