2015-03-14 21:48:35 +00:00
|
|
|
|
PR#3
|
2015-06-03 18:30:57 +00:00
|
|
|
|
PREFIX /A2OSX.SRC
|
2015-03-14 21:48:35 +00:00
|
|
|
|
NEW
|
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
.LIST OFF
|
2016-10-26 20:51:06 +00:00
|
|
|
|
*/--------------------------------------
|
|
|
|
|
* #GetDevByIDA
|
|
|
|
|
* ##IN:
|
2015-03-14 21:48:35 +00:00
|
|
|
|
* A = DevID
|
2016-10-26 20:51:06 +00:00
|
|
|
|
* ##OUT:
|
2015-03-14 21:48:35 +00:00
|
|
|
|
* CC = OK, CS = ERROR
|
|
|
|
|
* Y,A = devslot
|
2016-10-26 20:51:06 +00:00
|
|
|
|
* note: X Unmodified
|
|
|
|
|
*\--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.GetDevByIDA cmp DevMgr.LastDevID
|
2015-06-03 18:30:57 +00:00
|
|
|
|
beq .1
|
2016-09-21 15:20:37 +00:00
|
|
|
|
bcs K.GetDevDNF
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2016-09-29 15:30:15 +00:00
|
|
|
|
.1 pha save ID
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
adc #DevMgr.Table
|
|
|
|
|
tay
|
2016-09-29 15:30:15 +00:00
|
|
|
|
pla
|
|
|
|
|
php
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
plp
|
2015-06-03 18:30:57 +00:00
|
|
|
|
adc /DevMgr.Table
|
|
|
|
|
rts CC
|
2016-10-26 20:51:06 +00:00
|
|
|
|
*/--------------------------------------
|
|
|
|
|
* #GetDevIDByNameYA
|
|
|
|
|
* ##IN:
|
|
|
|
|
* Y,A = Ptr to device name (PStr)
|
|
|
|
|
* ##OUT:
|
2015-03-14 21:48:35 +00:00
|
|
|
|
* CC = OK, CS = ERROR
|
2015-06-03 18:30:57 +00:00
|
|
|
|
* X = DEVID
|
|
|
|
|
* Y,A = pDev
|
2016-10-26 20:51:06 +00:00
|
|
|
|
*\--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.GetDevByNameYA
|
2015-03-14 21:48:35 +00:00
|
|
|
|
>STYA ZPQuickPtr1
|
2015-06-03 18:30:57 +00:00
|
|
|
|
>LDYAI DevMgr.Table+S.DEV.NAME
|
|
|
|
|
>STYA ZPQuickPtr2
|
2015-03-14 21:48:35 +00:00
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
ldx #0
|
|
|
|
|
|
2016-10-07 20:48:49 +00:00
|
|
|
|
.1 lda (ZPQuickPtr1)
|
|
|
|
|
cmp (ZPQuickPtr2)
|
|
|
|
|
bne .3
|
|
|
|
|
|
|
|
|
|
tay
|
|
|
|
|
|
2015-03-14 21:48:35 +00:00
|
|
|
|
.2 lda (ZPQuickPtr1),y
|
|
|
|
|
cmp (ZPQuickPtr2),y
|
|
|
|
|
bne .3
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2016-10-07 20:48:49 +00:00
|
|
|
|
dey
|
2015-03-14 21:48:35 +00:00
|
|
|
|
bne .2
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
|
|
|
|
lda ZPQuickPtr2
|
|
|
|
|
sec
|
|
|
|
|
sbc #S.DEV.NAME
|
|
|
|
|
tay
|
|
|
|
|
lda ZPQuickPtr2+1
|
|
|
|
|
sbc /S.DEV.NAME
|
2015-03-14 21:48:35 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
|
|
|
|
.3 lda ZPQuickPtr2
|
2015-03-14 21:48:35 +00:00
|
|
|
|
clc
|
2016-10-03 15:59:36 +00:00
|
|
|
|
adc #S.DEV
|
2015-06-03 18:30:57 +00:00
|
|
|
|
sta ZPQuickPtr2
|
|
|
|
|
bcc .4
|
|
|
|
|
|
|
|
|
|
inc ZPQuickPtr2+1
|
|
|
|
|
|
|
|
|
|
.4 cpx DevMgr.LastDevID
|
|
|
|
|
inx
|
|
|
|
|
bcc .1
|
|
|
|
|
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.GetDevDNF lda #DEVMGR.ERRDNF
|
2015-03-14 21:48:35 +00:00
|
|
|
|
rts
|
2016-10-26 20:51:06 +00:00
|
|
|
|
*/--------------------------------------
|
|
|
|
|
* #GetDevInfoA
|
|
|
|
|
* ##IN:
|
|
|
|
|
* A = DevID
|
|
|
|
|
* ##OUT:
|
|
|
|
|
* CC = OK, CS = ERROR
|
|
|
|
|
* Y,A = Ptr to S.DEVINFO
|
|
|
|
|
*\--------------------------------------
|
2016-09-21 15:20:37 +00:00
|
|
|
|
K.GetDevInfoA jsr K.GetDevByIDA
|
|
|
|
|
bcs K.GetDevDNF
|
2016-02-24 19:52:24 +00:00
|
|
|
|
>STYA ZPQuickPtr1
|
|
|
|
|
ldx #DEVMGR.GETINFO
|
2016-08-18 15:26:11 +00:00
|
|
|
|
jmp (ZPQuickPtr1)
|
2016-02-24 19:52:24 +00:00
|
|
|
|
*--------------------------------------
|
2015-03-14 21:48:35 +00:00
|
|
|
|
MAN
|
|
|
|
|
SAVE SYS/KERNEL.S.DEV
|
|
|
|
|
LOAD SYS/KERNEL.S
|
|
|
|
|
ASM
|