DRV:Bug fixed preventing INSDRV resuming after loading a driver

This commit is contained in:
Rémy GIBERT 2016-03-18 08:25:43 +01:00
parent 0ef0939f24
commit b616022a9e

View File

@ -35,11 +35,11 @@ S.LoadDrvA >PUSHA push Cmd Line for S.PStrGetTkn
jsr S.LoadBinA
bcs .96
>STYA pCode
>STYA pDrv
stx LoadDrv.hMem
lda LoadDrv.Args
jsr pCodeJmp call Dev.Detect
jsr S.LoadDrvA.Jmp call Dev.Detect
bcs .95
@ -80,28 +80,30 @@ S.LoadDrvA >PUSHA push Cmd Line for S.PStrGetTkn
.99 sec
rts
*--------------------------------------
S.LoadDrvA.Jmp jmp (pDrv)
*--------------------------------------
LoadDrv.Cmd .BS 1
LoadDrv.Args .BS 1
LoadDrv.Path .BS 1
LoadDrv.FullName .BS 1
LoadDrv.hMem .BS 1
*--------------------------------------
* pCode = .DRV File Loaded Address
* pDrv = .DRV File Loaded Address
*--------------------------------------
S.InsDrv ldy #H.BIN.DRV.CODE.LEN
lda (pCode),y
lda (pDrv),y
sta R.AL
iny
lda (pCode),y
lda (pDrv),y
sta R.AH
ldy #H.BIN.DRV.CODE.O
lda (pCode),y
lda (pDrv),y
clc
adc S.LoadBinA.AuxType
sta R.BL
iny
lda (pCode),y
lda (pDrv),y
adc S.LoadBinA.AuxType+1
sta R.BH set BX=End Of Code
@ -116,11 +118,11 @@ S.InsDrv ldy #H.BIN.DRV.CODE.LEN
ldy #H.BIN.DRV.CODE.O
lda S.LoadBinA.FileLen
sec
sbc (pCode),y
sbc (pDrv),y
sta S.InsDrv.DRVLen
iny
lda S.LoadBinA.FileLen+1
sbc (pCode),y
sbc (pDrv),y
sta S.InsDrv.DRVLen+1 Compute DRV Len
lda DevMgr.Free
@ -148,13 +150,13 @@ S.InsDrv ldy #H.BIN.DRV.CODE.LEN
sta DevMgr.LastDevID
ldy #H.BIN.DEV.HEADER.O
lda (pCode),y
lda (pDrv),y
clc
adc pCode
adc pDrv
sta ZPQuickPtr1
iny
lda (pCode),y
adc pCode+1
lda (pDrv),y
adc pDrv+1
sta ZPQuickPtr1+1
ldy #S.DEV.JMP
@ -169,13 +171,13 @@ S.InsDrv ldy #H.BIN.DRV.CODE.LEN
sta R.DH set DX=Offset
ldy #H.BIN.DRV.CODE.O
lda (pCode),y
lda (pDrv),y
clc
adc pCode
adc pDrv
pha
iny
lda (pCode),y
adc pCode+1
lda (pDrv),y
adc pDrv+1
ply
jsr S.DrvRelocateYA
@ -196,13 +198,13 @@ S.InsDrv ldy #H.BIN.DRV.CODE.LEN
rts
*--------------------------------------
S.InsDrv.Move ldy #H.BIN.DEV.HEADER.O
lda (pCode),y
lda (pDrv),y
clc
adc pCode
adc pDrv
sta ZPQuickPtr1
iny
lda (pCode),y
adc pCode+1
lda (pDrv),y
adc pDrv+1
sta ZPQuickPtr1+1
ldy #S.DEV.JMP Relocate Main JMP
@ -230,13 +232,13 @@ S.InsDrv.Move ldy #H.BIN.DEV.HEADER.O
bpl .1
ldy #H.BIN.DRV.CODE.O
lda (pCode),y
lda (pDrv),y
clc
adc pCode
adc pDrv
sta ZPQuickPtr1
iny
lda (pCode),y
adc pCode+1
lda (pDrv),y
adc pDrv+1
sta ZPQuickPtr1+1 Make ZPQuickPtr1=DRV.CODE
lda DevMgr.Free