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/LSDEV
|
2015-03-14 22:47:37 +01:00
|
|
|
|
*--------------------------------------
|
2016-10-26 22:51:06 +02:00
|
|
|
|
.INB /A2OSX.DEV/INC/MACROS.I
|
2016-11-24 18:00:03 +01:00
|
|
|
|
.INB /A2OSX.DEV/INC/PRODOS.I
|
2016-10-26 22:51:06 +02:00
|
|
|
|
.INB /A2OSX.DEV/INC/A2OSX.I
|
2015-03-14 22:47:37 +01:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
ZPPTR1 .EQ ZPBIN
|
2016-11-25 17:20:28 +01:00
|
|
|
|
ZPPTR2 .EQ ZPBIN+2
|
2015-03-14 22:47:37 +01:00
|
|
|
|
*--------------------------------------
|
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 0 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.EVENT
|
|
|
|
|
.DA CS.QUIT
|
|
|
|
|
L.MSG0 .DA MSG0
|
|
|
|
|
L.MSG1 .DA MSG1
|
2017-01-25 22:46:40 +01:00
|
|
|
|
L.MSG2 .DA MSG2
|
2017-01-12 18:43:45 +01:00
|
|
|
|
L.DEV.NAME .DA DEV.NAME
|
2015-03-14 22:47:37 +01:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
2017-01-12 18:43:45 +01:00
|
|
|
|
CS.INIT clc
|
2016-11-24 18:00:03 +01:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-01-12 18:43:45 +01:00
|
|
|
|
CS.RUN >LDYA L.MSG0
|
2016-11-03 17:27:43 +01:00
|
|
|
|
>SYSCALL CPrintFYA
|
2015-03-14 22:47:37 +01:00
|
|
|
|
|
2016-11-24 18:00:03 +01:00
|
|
|
|
>LDYAI DevMgr.Table
|
|
|
|
|
>STYA ZPPTR1
|
2017-01-25 22:46:40 +01:00
|
|
|
|
|
2016-11-24 18:00:03 +01:00
|
|
|
|
stz DEV.ID
|
|
|
|
|
|
2017-01-12 18:43:45 +01:00
|
|
|
|
.1 lda DEV.ID
|
|
|
|
|
|
|
|
|
|
>SYSCALL GetDevByIDA
|
2017-01-25 22:46:40 +01:00
|
|
|
|
bcc .10
|
|
|
|
|
jmp .8
|
2017-02-02 18:30:07 +01:00
|
|
|
|
|
2017-01-25 22:46:40 +01:00
|
|
|
|
.10 >STYA ZPPTR1
|
|
|
|
|
|
2016-06-07 08:10:18 +02:00
|
|
|
|
ldy #S.DEV.JMP+1
|
|
|
|
|
>PUSHB (ZPPTR1),y
|
2017-01-25 22:46:40 +01:00
|
|
|
|
sta GetDevStatusJmp+2
|
2016-06-07 08:10:18 +02:00
|
|
|
|
dey
|
|
|
|
|
>PUSHB (ZPPTR1),y
|
2017-01-25 22:46:40 +01:00
|
|
|
|
sta GetDevStatusJmp+1
|
2016-06-07 08:10:18 +02:00
|
|
|
|
|
2017-01-12 18:43:45 +01:00
|
|
|
|
ldy #S.DEV.F
|
|
|
|
|
lda (ZPPTR1),y
|
|
|
|
|
and #S.DEV.F.LEN
|
|
|
|
|
sta DEV.NAME
|
|
|
|
|
tax
|
|
|
|
|
iny
|
|
|
|
|
|
|
|
|
|
.2 lda (ZPPTR1),y
|
|
|
|
|
sta DEV.NAME-S.DEV.F,y
|
|
|
|
|
iny
|
|
|
|
|
dex
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
>PUSHW L.DEV.NAME
|
2015-03-14 22:47:37 +01:00
|
|
|
|
|
2015-06-03 20:30:57 +02:00
|
|
|
|
ldy #S.DEV.F
|
2017-02-02 18:30:07 +01:00
|
|
|
|
lda (ZPPTR1),y
|
|
|
|
|
and #$FF^S.DEV.F.LEN
|
|
|
|
|
>PUSHA
|
2017-01-12 18:43:45 +01:00
|
|
|
|
|
|
|
|
|
ldy #S.DEV.S
|
2016-06-07 08:10:18 +02:00
|
|
|
|
>PUSHB (ZPPTR1),y
|
2017-01-12 18:43:45 +01:00
|
|
|
|
|
|
|
|
|
>PUSHB DEV.ID
|
|
|
|
|
|
2016-10-17 08:21:04 +02:00
|
|
|
|
>LDYA L.MSG1
|
2016-11-03 17:27:43 +01:00
|
|
|
|
>SYSCALL CPrintFYA
|
2017-01-25 22:46:40 +01:00
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
jsr GetDevStatus
|
|
|
|
|
bcs .7
|
|
|
|
|
>STYA ZPPTR2
|
|
|
|
|
|
|
|
|
|
ldy #S.DEVSTAT.VERSION+1
|
|
|
|
|
>PUSHB (ZPPTR2),y
|
|
|
|
|
dey
|
|
|
|
|
>PUSHB (ZPPTR2),y
|
|
|
|
|
|
|
|
|
|
lda ZPPTR2
|
|
|
|
|
clc
|
|
|
|
|
adc #S.DEVSTAT.IDSTRING
|
|
|
|
|
tay
|
|
|
|
|
lda ZPPTR2+1
|
|
|
|
|
adc #0
|
|
|
|
|
|
|
|
|
|
>PUSHYA
|
|
|
|
|
|
|
|
|
|
ldy #S.DEVSTAT.SUBTYPE
|
|
|
|
|
>PUSHB (ZPPTR2),y
|
|
|
|
|
dey
|
|
|
|
|
>PUSHB (ZPPTR2),y
|
|
|
|
|
|
|
|
|
|
>LDYA L.MSG2
|
|
|
|
|
>SYSCALL CPrintFYA
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
.7 lda #13
|
2017-03-01 11:31:19 +01:00
|
|
|
|
>SYSCALL PutCA
|
|
|
|
|
lda #10
|
2017-01-25 22:46:40 +01:00
|
|
|
|
>SYSCALL PutCA
|
2017-01-12 18:43:45 +01:00
|
|
|
|
inc DEV.ID
|
|
|
|
|
|
2015-06-03 20:30:57 +02:00
|
|
|
|
lda ZPPTR1
|
2015-03-14 22:47:37 +01:00
|
|
|
|
clc
|
2016-10-07 08:09:25 +02:00
|
|
|
|
adc #S.DEV
|
2015-03-14 22:47:37 +01:00
|
|
|
|
sta ZPPTR1
|
2017-01-25 22:46:40 +01:00
|
|
|
|
bcc .3
|
2015-03-14 22:47:37 +01:00
|
|
|
|
inc ZPPTR1+1
|
2017-01-25 22:46:40 +01:00
|
|
|
|
.3 jmp .1
|
2015-06-03 20:30:57 +02:00
|
|
|
|
|
2016-11-25 17:20:28 +01:00
|
|
|
|
|
2017-01-12 18:43:45 +01:00
|
|
|
|
.8 lda #0 tell TSKMGR that all done ok, but
|
|
|
|
|
.9 sec we do not want to stay in memory
|
2015-03-14 22:47:37 +01:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-01-15 21:51:20 +01:00
|
|
|
|
CS.EVENT sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2016-10-17 08:21:04 +02:00
|
|
|
|
CS.QUIT clc
|
2015-03-14 22:47:37 +01:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-01-25 22:46:40 +01:00
|
|
|
|
GetDevStatus ldx #DEVMGR.STATUS
|
|
|
|
|
GetDevStatusJmp jmp $ffff
|
|
|
|
|
*--------------------------------------
|
2016-11-24 18:00:03 +01:00
|
|
|
|
CS.END
|
2017-03-01 11:31:19 +01:00
|
|
|
|
MSG0 >CSTR "ID Status Flags Name Addr. Typ/Sub IDString Version\r\n"
|
2017-01-25 22:46:40 +01:00
|
|
|
|
MSG1 >CSTR "%03d %b %b %4S $%H "
|
|
|
|
|
MSG2 >CSTR "$%h/$%h %16S %03d.%03d"
|
2016-11-24 18:00:03 +01:00
|
|
|
|
*--------------------------------------
|
2015-06-03 20:30:57 +02:00
|
|
|
|
DEV.ID .BS 1
|
2017-01-12 18:43:45 +01:00
|
|
|
|
DEV.NAME .BS 5
|
2015-03-14 22:47:37 +01:00
|
|
|
|
MAN
|
|
|
|
|
SAVE BIN/LSDEV.S
|
|
|
|
|
ASM
|