A2osX/SYS/KERNEL.S.DRV.txt

79 lines
1.4 KiB
Plaintext
Raw Normal View History

2015-06-03 18:30:57 +00:00
PR#3
PREFIX /A2OSX.SRC
LOMEM $A00
2015-06-03 18:30:57 +00:00
INC 1
AUTO 6
*--------------------------------------
2016-09-21 15:20:37 +00:00
* K.LoadDrvYA
2015-06-03 18:30:57 +00:00
* in :
2016-08-17 06:25:58 +00:00
* Y,A = PTR To Full Cmd Line PStrArray
2015-06-03 18:30:57 +00:00
* out :
* none
*--------------------------------------
2016-09-21 15:20:37 +00:00
K.LoadDrvYA >STYA K.LoadDrv.CmdArray
>LDYAI ENV.DRV push ENVNAME=DRV
>SYSCALL GetEnvYA get value for ENV=DRV
2016-08-17 06:25:58 +00:00
bcs .99
2016-08-17 06:25:58 +00:00
>PUSHYA Push $DRV value
2016-09-21 15:20:37 +00:00
>PUSHW K.LoadDrv.CmdArray (ARG[0] = DRVNAME)
2016-06-07 06:10:18 +00:00
2016-09-21 15:20:37 +00:00
jsr K.FileSearch find libname in $DRV
2016-08-17 06:25:58 +00:00
bcs .99
2016-09-21 15:20:37 +00:00
stx K.LoadDrv.hFullName
jsr K.LoadExeYA Y,A =filename full path
2016-08-17 06:25:58 +00:00
bcs .98
2015-06-03 18:30:57 +00:00
>STYA pDrv
2016-09-21 15:20:37 +00:00
stx K.LoadDrv.hMem
2016-09-21 15:20:37 +00:00
>LDYA K.LoadDrv.CmdArray Advance to ARG[1]
2017-01-12 17:43:45 +00:00
>STYA ZPPtr1
2016-08-17 06:25:58 +00:00
2017-01-12 17:43:45 +00:00
lda ZPPtr1
2016-08-17 06:25:58 +00:00
sec
2017-01-12 17:43:45 +00:00
adc (ZPPtr1)
sta ZPPtr1
2016-08-17 06:25:58 +00:00
bcc .1
2017-01-12 17:43:45 +00:00
inc ZPPtr1+1
2016-08-17 06:25:58 +00:00
2017-01-12 17:43:45 +00:00
.1 >LDYA ZPPtr1
2016-08-17 06:25:58 +00:00
jsr pDrvJmp call Dev.Detect
2015-06-03 18:30:57 +00:00
2016-08-17 06:25:58 +00:00
bcs .97
jsr BIN.InstallDRV
2016-08-17 06:25:58 +00:00
bcs .97
2015-06-03 18:30:57 +00:00
2016-08-17 06:25:58 +00:00
jsr .97 Cleanup...
2015-06-03 18:30:57 +00:00
2016-08-17 06:25:58 +00:00
lda #0 Make sure RC = 0 if success
clc
.99 rts
2016-08-17 06:25:58 +00:00
.97 pha
2016-09-21 15:20:37 +00:00
lda K.LoadDrv.hMem
jsr K.FreeMemA
2015-06-03 18:30:57 +00:00
pla
2016-08-17 06:25:58 +00:00
.98 pha
2016-09-21 15:20:37 +00:00
lda K.LoadDrv.hFullName
jsr K.FreeMemA
2015-06-03 18:30:57 +00:00
pla
2016-08-17 06:25:58 +00:00
sec
2015-06-03 18:30:57 +00:00
rts
*--------------------------------------
2016-09-21 15:20:37 +00:00
K.LoadDrv.CmdArray .BS 2
K.LoadDrv.hFullName .BS 1
K.LoadDrv.hMem .BS 1
2015-06-03 18:30:57 +00:00
*--------------------------------------
MAN
SAVE SYS/KERNEL.S.DRV
LOAD SYS/KERNEL.S
ASM