2017-12-22 21:24:30 +00:00
|
|
|
|
NEW
|
2017-03-29 15:48:15 +00:00
|
|
|
|
PREFIX /A2OSX.BUILD
|
2017-12-22 21:24:30 +00:00
|
|
|
|
AUTO 4,1
|
2016-10-26 20:51:06 +00:00
|
|
|
|
*/--------------------------------------
|
2018-06-21 15:12:10 +00:00
|
|
|
|
* # GetDevByID
|
2018-06-14 15:31:36 +00:00
|
|
|
|
* **In:**
|
2018-06-18 06:22:50 +00:00
|
|
|
|
* A = DevID
|
2018-06-14 15:31:36 +00:00
|
|
|
|
* **Out:**
|
2018-06-18 06:22:50 +00:00
|
|
|
|
* CC = OK, CS = ERROR
|
|
|
|
|
* Y,A = DEVSLOT
|
2016-10-26 20:51:06 +00:00
|
|
|
|
*\--------------------------------------
|
2018-07-09 15:25:38 +00:00
|
|
|
|
K.GetDevByID cmp DevMgr.DevCnt
|
2018-06-25 05:59:43 +00:00
|
|
|
|
bcs K.GetDev.NODEV
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2018-06-25 05:59:43 +00:00
|
|
|
|
tax
|
2017-01-12 17:43:45 +00:00
|
|
|
|
|
2018-07-11 15:13:29 +00:00
|
|
|
|
ldy FD.Table.PTRLO,x
|
|
|
|
|
lda FD.Table.PTRHI,x
|
2018-06-25 05:59:43 +00:00
|
|
|
|
|
|
|
|
|
* clc
|
|
|
|
|
|
|
|
|
|
.9 rts CC
|
2016-10-26 20:51:06 +00:00
|
|
|
|
*/--------------------------------------
|
2018-06-21 15:12:10 +00:00
|
|
|
|
* # GetDevByName
|
2018-06-14 15:31:36 +00:00
|
|
|
|
* **In:**
|
2017-09-14 15:21:06 +00:00
|
|
|
|
* Y,A = Ptr to device name (C-String)
|
2018-06-14 15:31:36 +00:00
|
|
|
|
* **Out:**
|
2015-03-14 21:48:35 +00:00
|
|
|
|
* CC = OK, CS = ERROR
|
2015-06-03 18:30:57 +00:00
|
|
|
|
* X = DEVID
|
2018-07-11 15:13:29 +00:00
|
|
|
|
* Y,A = FD
|
2016-10-26 20:51:06 +00:00
|
|
|
|
*\--------------------------------------
|
2018-06-21 15:12:10 +00:00
|
|
|
|
K.GetDevByName >STYA ZPPtr1
|
2015-03-14 21:48:35 +00:00
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
ldx #0
|
|
|
|
|
|
2018-07-11 15:13:29 +00:00
|
|
|
|
.1 ldy FD.Table.PTRLO,x
|
|
|
|
|
lda FD.Table.PTRHI,x
|
2018-06-25 05:59:43 +00:00
|
|
|
|
|
|
|
|
|
>STYA ZPPtr2
|
|
|
|
|
|
2018-07-11 15:13:29 +00:00
|
|
|
|
lda ZPPtr2
|
2018-06-25 05:59:43 +00:00
|
|
|
|
clc
|
2018-07-10 15:33:13 +00:00
|
|
|
|
adc #S.FD.DEV.NAME
|
2018-06-25 05:59:43 +00:00
|
|
|
|
sta ZPPtr3
|
2018-07-11 15:13:29 +00:00
|
|
|
|
|
|
|
|
|
lda ZPPtr2+1
|
2018-06-25 05:59:43 +00:00
|
|
|
|
adc #0
|
|
|
|
|
sta ZPPtr3+1
|
|
|
|
|
|
2018-07-11 15:13:29 +00:00
|
|
|
|
ldy #$ff
|
2016-10-07 20:48:49 +00:00
|
|
|
|
|
2017-09-14 15:21:06 +00:00
|
|
|
|
.2 iny
|
|
|
|
|
lda (ZPPtr1),y
|
2018-06-25 05:59:43 +00:00
|
|
|
|
cmp (ZPPtr3),y
|
|
|
|
|
bne .4
|
2017-10-10 15:40:23 +00:00
|
|
|
|
|
2018-06-25 05:59:43 +00:00
|
|
|
|
ora (ZPPtr3),y Both char are 0 ?
|
2017-10-10 15:40:23 +00:00
|
|
|
|
bne .2 no....loop
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2018-07-11 15:13:29 +00:00
|
|
|
|
ldy ZPPtr2
|
2018-06-25 05:59:43 +00:00
|
|
|
|
lda ZPPtr3+1
|
2015-03-14 21:48:35 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2017-01-12 17:43:45 +00:00
|
|
|
|
.4 inx
|
2018-07-09 15:25:38 +00:00
|
|
|
|
cpx DevMgr.DevCnt
|
2017-01-12 17:43:45 +00:00
|
|
|
|
bne .1
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
2018-06-25 05:59:43 +00:00
|
|
|
|
K.GetDev.NODEV lda #MLI.E.NODEV
|
|
|
|
|
sec
|
2018-07-11 15:13:29 +00:00
|
|
|
|
K.GetDev.9 rts
|
2018-01-15 06:50:44 +00:00
|
|
|
|
*/--------------------------------------
|
2018-06-21 15:12:10 +00:00
|
|
|
|
* # GetDevStatus
|
2018-06-14 15:31:36 +00:00
|
|
|
|
* **In:**
|
2018-01-15 06:50:44 +00:00
|
|
|
|
* A = DevID
|
2018-06-14 15:31:36 +00:00
|
|
|
|
* **Out:**
|
2018-01-15 06:50:44 +00:00
|
|
|
|
* Y,A = S.DSTAT
|
|
|
|
|
*\--------------------------------------
|
2018-06-22 14:59:24 +00:00
|
|
|
|
K.GetDevStatus ldx #IOCTL.STATUS
|
|
|
|
|
jsr K.GetDevByID
|
2018-07-11 15:13:29 +00:00
|
|
|
|
bcs K.GetDev.9
|
2018-01-15 06:50:44 +00:00
|
|
|
|
|
2018-07-11 15:13:29 +00:00
|
|
|
|
>STYA pFD
|
2018-01-15 06:50:44 +00:00
|
|
|
|
|
2018-07-11 15:13:29 +00:00
|
|
|
|
jmp (pFD)
|
2016-02-24 19:52:24 +00:00
|
|
|
|
*--------------------------------------
|
2015-03-14 21:48:35 +00:00
|
|
|
|
MAN
|
2017-03-29 15:48:15 +00:00
|
|
|
|
SAVE /A2OSX.SRC/SYS/KERNEL.S.DEV
|
|
|
|
|
LOAD /A2OSX.SRC/SYS/KERNEL.S
|
2015-03-14 21:48:35 +00:00
|
|
|
|
ASM
|