mirror of
https://github.com/A2osX/A2osX.git
synced 2024-10-31 23:09:33 +00:00
75 lines
1.3 KiB
Plaintext
75 lines
1.3 KiB
Plaintext
PR#3
|
||
PREFIX /A2OSX.BUILD
|
||
LOMEM $A00
|
||
INC 1
|
||
AUTO 6
|
||
*--------------------------------------
|
||
* K.LoadDrvYA
|
||
* in :
|
||
* Y,A = PTR To Full Cmd Line PStrArray
|
||
* out :
|
||
* none
|
||
*--------------------------------------
|
||
K.LoadDrvYA >STYA K.LoadDrv.CmdArray
|
||
|
||
>LDYAI ENV.DRV push ENVNAME=DRV
|
||
>SYSCALL GetEnvYA get value for ENV=DRV
|
||
bcs .9
|
||
|
||
>PUSHYA Push $DRV value
|
||
|
||
>PUSHW K.LoadDrv.CmdArray (ARG[0] = DRVNAME)
|
||
|
||
jsr K.FileSearch find Driver in $DRV
|
||
bcs .9
|
||
stx .99+1
|
||
|
||
jsr K.LoadExeYA Y,A =filename full path
|
||
bcs .98
|
||
|
||
>STYA pDrv
|
||
stx .97+1
|
||
|
||
>LDYA K.LoadDrv.CmdArray Advance to ARG[1]
|
||
>STYA ZPPtr1
|
||
|
||
lda ZPPtr1
|
||
sec
|
||
adc (ZPPtr1)
|
||
sta ZPPtr1
|
||
bcc .1
|
||
inc ZPPtr1+1
|
||
|
||
.1 >LDYA ZPPtr1
|
||
|
||
jsr pDrvJmp call Dev.Detect
|
||
bcs .96
|
||
|
||
jsr BIN.InstallDRV
|
||
bcs .96
|
||
|
||
jsr .96 Cleanup...
|
||
|
||
lda #0 Make sure RC = 0 if success
|
||
clc
|
||
.9 rts
|
||
|
||
.96 pha
|
||
.97 lda #$ff
|
||
jsr K.FreeMemA
|
||
pla
|
||
|
||
.98 pha
|
||
.99 lda #$ff
|
||
jsr K.FreeMemA
|
||
pla
|
||
sec
|
||
rts
|
||
*--------------------------------------
|
||
K.LoadDrv.CmdArray .BS 2
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE /A2OSX.SRC/SYS/KERNEL.S.DRV
|
||
LOAD /A2OSX.SRC/SYS/KERNEL.S
|
||
ASM
|