2015-03-14 21:47:37 +00:00
|
|
|
|
NEW
|
2017-12-22 21:24:30 +00:00
|
|
|
|
PREFIX /A2OSX.BUILD
|
|
|
|
|
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
|
|
|
|
|
.INB INC/PRODOS.I
|
|
|
|
|
.INB INC/A2OSX.I
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
ZPPTR1 .EQ ZPBIN
|
2016-11-25 16:20:28 +00:00
|
|
|
|
ZPPTR2 .EQ ZPBIN+2
|
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
|
|
|
|
|
.DA 0
|
2017-09-21 15:29:45 +00:00
|
|
|
|
.DA CS.END-CS.START CS
|
|
|
|
|
.DA DS.END-DS.START DS
|
|
|
|
|
.DA #16 SS
|
|
|
|
|
.DA #4 ZP
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
|
|
|
|
*--------------------------------------
|
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-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
|
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
|
|
|
|
|
*--------------------------------------
|
2017-01-12 17:43:45 +00:00
|
|
|
|
CS.RUN >LDYA L.MSG0
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>SYSCALL puts
|
2018-07-19 15:33:55 +00:00
|
|
|
|
|
2017-09-21 15:29:45 +00:00
|
|
|
|
>LDA.G DEV.ID
|
2017-01-12 17:43:45 +00:00
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
.1 >SYSCALL GetDevByID
|
2017-03-20 16:54:27 +00:00
|
|
|
|
bcs .7
|
2017-02-02 17:30:07 +00:00
|
|
|
|
|
2018-07-19 15:33:55 +00:00
|
|
|
|
>STYA ZPPTR1 S.FD
|
2018-08-08 15:13:37 +00:00
|
|
|
|
txa
|
|
|
|
|
>STA.G DEV.FD
|
|
|
|
|
|
2018-07-19 15:33:55 +00:00
|
|
|
|
jsr DumpFD
|
2017-03-20 16:54:27 +00:00
|
|
|
|
|
|
|
|
|
bcs .9
|
2018-08-08 15:13:37 +00:00
|
|
|
|
|
2018-07-19 15:33:55 +00:00
|
|
|
|
>PUSHEA.G DEV.DIB
|
2018-08-08 15:13:37 +00:00
|
|
|
|
>LDA.G DEV.FD
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL GetDevStatus
|
2017-03-20 16:54:27 +00:00
|
|
|
|
bcs .6
|
2018-01-15 06:50:44 +00:00
|
|
|
|
|
2018-07-19 15:33:55 +00:00
|
|
|
|
jsr DumpDIB
|
2017-03-20 16:54:27 +00:00
|
|
|
|
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
.6 lda #13
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL PutChar
|
2017-03-20 16:54:27 +00:00
|
|
|
|
lda #10
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL PutChar
|
2018-07-19 15:33:55 +00:00
|
|
|
|
|
|
|
|
|
.7 >INC.G DEV.ID
|
2017-03-20 16:54:27 +00:00
|
|
|
|
cmp #K.DEV.MAX
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
.8 lda #0 tell TSKMGR that all done ok, but
|
2018-01-15 06:50:44 +00:00
|
|
|
|
sec we do not want to stay in memory
|
|
|
|
|
.9 rts
|
2017-03-20 16:54:27 +00:00
|
|
|
|
*--------------------------------------
|
2018-07-19 15:33:55 +00:00
|
|
|
|
DumpFD ldy #S.FD.DEV.DRVPTR+1
|
2017-03-20 16:54:27 +00:00
|
|
|
|
>PUSHB (ZPPTR1),y
|
2017-01-25 21:46:40 +00:00
|
|
|
|
|
2016-06-07 06:10:18 +00:00
|
|
|
|
dey
|
2017-03-20 16:54:27 +00:00
|
|
|
|
>PUSHB (ZPPTR1),y
|
2016-06-07 06:10:18 +00:00
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
lda #S.FD.DEV.NAME
|
2017-03-15 16:44:15 +00:00
|
|
|
|
clc
|
2017-03-20 16:54:27 +00:00
|
|
|
|
adc ZPPTR1
|
2017-03-15 16:44:15 +00:00
|
|
|
|
tay
|
2017-01-12 17:43:45 +00:00
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
lda /S.FD.DEV.NAME
|
2017-03-20 16:54:27 +00:00
|
|
|
|
adc ZPPTR1+1
|
2017-03-15 16:44:15 +00:00
|
|
|
|
>PUSHYA
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHB.G DEV.ID
|
2017-01-12 17:43:45 +00:00
|
|
|
|
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>PUSHBI 5
|
2016-10-17 06:21:04 +00:00
|
|
|
|
>LDYA L.MSG1
|
2018-06-21 15:12:10 +00:00
|
|
|
|
>SYSCALL printf
|
2017-03-20 16:54:27 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-08-24 10:20:23 +00:00
|
|
|
|
DumpDIB >PUSHB.G DEV.DIB+S.DIB.VERSION+1
|
2018-07-19 15:33:55 +00:00
|
|
|
|
>PUSHB.G DEV.DIB+S.DIB.VERSION
|
2017-01-25 21:46:40 +00:00
|
|
|
|
|
2018-07-19 15:33:55 +00:00
|
|
|
|
>PUSHEA.G DEV.DIB+S.DIB.IDS
|
2017-01-25 21:46:40 +00:00
|
|
|
|
|
2018-07-19 15:33:55 +00:00
|
|
|
|
>PUSHB.G DEV.DIB+S.DIB.ST
|
|
|
|
|
>PUSHB.G DEV.DIB+S.DIB.T
|
2016-11-25 16:20:28 +00:00
|
|
|
|
|
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
|
|
|
|
|
|
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
|
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
lda MSG.SFLAGS,x
|
|
|
|
|
|
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
|
2018-07-18 15:30:42 +00:00
|
|
|
|
|
|
|
|
|
>PUSHEA.G DEV.SFLAGS
|
2018-08-24 10:20:23 +00:00
|
|
|
|
>PUSHBI 8
|
|
|
|
|
>LDYA L.MSG2
|
|
|
|
|
>SYSCALL printf
|
|
|
|
|
bcs .9
|
|
|
|
|
|
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...
|
2018-08-22 15:23:27 +00:00
|
|
|
|
|
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
|
|
|
|
>LDYA L.MSG2.B
|
|
|
|
|
bra .8
|
2018-08-22 15:23:27 +00:00
|
|
|
|
|
2018-08-24 10:20:23 +00:00
|
|
|
|
.4 >PUSHBI 0
|
2018-08-22 15:23:27 +00:00
|
|
|
|
>LDYA L.MSG2.C
|
2018-07-19 15:33:55 +00:00
|
|
|
|
|
|
|
|
|
.8 >SYSCALL printf
|
2018-08-24 10:20:23 +00:00
|
|
|
|
.9 rts
|
2018-07-18 15:30:42 +00:00
|
|
|
|
*--------------------------------------
|
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
|
2018-08-22 15:23:27 +00:00
|
|
|
|
MSG0 .AZ "ID Name Addr. Status Typ/Sub IDString Version Size (BLK)"
|
2018-07-19 15:33:55 +00:00
|
|
|
|
MSG1 .AZ "%03d %7s $%H "
|
2018-08-24 10:20:23 +00:00
|
|
|
|
MSG2 .AZ "%s $%h/$%h %16S %03d.%03d "
|
|
|
|
|
MSG2.B .AZ "%10u"
|
|
|
|
|
MSG2.C .AZ "n/a"
|
2017-10-06 15:25:14 +00:00
|
|
|
|
MSG.SFLAGS .AS "BWRLNEIO"
|
2016-11-24 17:00:03 +00:00
|
|
|
|
*--------------------------------------
|
2017-09-21 15:29:45 +00:00
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
|
|
|
|
DS.START
|
2015-06-03 18:30:57 +00:00
|
|
|
|
DEV.ID .BS 1
|
2018-08-08 15:13:37 +00:00
|
|
|
|
DEV.FD .BS 1
|
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
|
2017-03-29 15:48:15 +00:00
|
|
|
|
SAVE /A2OSX.SRC/BIN/LSDEV.S
|
2015-03-14 21:47:37 +00:00
|
|
|
|
ASM
|