From 34e139a963dca46c0a1b58de4e86065f1ba68bb4 Mon Sep 17 00:00:00 2001 From: Elliot Nunn Date: Sat, 24 Oct 2020 07:01:07 +0800 Subject: [PATCH] Don't just copy into System heap --- BootServer/INIT128.a | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/BootServer/INIT128.a b/BootServer/INIT128.a index e31db53..1fa7e33 100644 --- a/BootServer/INIT128.a +++ b/BootServer/INIT128.a @@ -6,36 +6,20 @@ myDRefNum equ ~myUnitNum move.l #'DRVR',-(SP) move.w #128,-(SP) dc.w $A81F ; _Get1Resource - move.l (SP)+,A3 + move.l (SP)+,A4 - move.l A3,D0 + move.l A4,D0 bne.s noGetResErr dc.w $A9FF ; _Debugger noGetResErr - ; Size it for the copy - move.l A3,A0 - dc.w $A025 ; _GetHandleSize - move.l D0,D4 + move.l A4,-(SP) + dc.w $A992 ; _DetachResource - ; Create a nonrelocatable block in the system heap - dc.w $A51E ; _NewPtrSys - move.l A0,A4 + move.l A4,A0 + dc.w $A029 ; _HLock - move.l A4,D0 - bne.s noNewPtrErr - dc.w $A9FF ; _Debugger -noNewPtrErr - - ; Copy it there - move.l (A3),A0 - move.l A4,A1 - move.l D4,D0 - dc.w $A02E ; _BlockMove (yes, of code) - - ; No further use for our resource - move.l A3,-(SP) - dc.w $A9A3 ; _ReleaseResource + move.l (A4),A4 ; Install the driver in the unit table move.l A4,A0