--- DEVLOAD.ASM	2011-08-05 22:33:08.000000000 +0200
+++ devecm.asm	2022-05-08 00:38:44.355058978 +0200
@@ -370,6 +370,10 @@
 grablowok:      mov     [DvcSeg],ax
 		mov	WORD [DvcSeg+2],ax	; ALSO adjust relocation! 8/2007
                 mov     [BlockSize],bx
+	int3
+	add ax, bx
+	mov word [EndSeg], ax
+
 
 				; *** added because of UMB alloc strat ***
                 mov     ax,5801h	; set (here: restore) alloc strat
@@ -1170,23 +1174,15 @@
 	; (clipping the value to 64k for now, feels more compatible)
 	; (alternative would be to tell EndSeg:0 instead of DvcSeg:xxxx)
 
-                mov     ax,[DvcSeg]
-                mov     word [RqHdr+10h],ax	; probably most compatible
-		mov	ax,[EndSeg]		; *** <new code> ***
-		sub	ax,[DvcSeg]		; find max number of paras
-		cmp	ax,1000h		; more than 64kby?
-		jb	tellsmall
-		mov	ax,0fffh		; max reported value
-tellsmall:	shl	ax,1			; convert paras to bytes
-		shl	ax,1
-		shl	ax,1
-		shl	ax,1
-		or	ax,0ch			; round up to 0xxxch
-                mov     word [RqHdr+0Eh],ax	; *** </new code> ***
-; ***		mov     word ptr [RqHdr+0Eh],0	; *** old code ***
+	; ecm 2022 May: Pass segment to allow loading lDebug as driver.
+
+	int3
+		mov	ax, [EndSeg]
+                mov     word [RqHdr+10h], ax
+		and     word [RqHdr+0Eh], 0
 
         ; Insert default no blocks (number of units: 0) in driver.
-                
+
                 mov     byte [RqHdr+0Dh],0
 
         ; Insert pointer to copy of command line.
@@ -1281,6 +1277,7 @@
 
         ; Convert to paragraphs (rounded up.)
 
+	int3
                 add     ax,0Fh
                 rcr     ax,1
                 mov     cl,3
@@ -1292,8 +1289,10 @@
 
         ; Compare with previous value of EndSeg
 
+	int3
                 cmp     ax,[EndSeg]
-                jb      endset
+                ; jb      endset
+	jbe oktogrow
 
         ; EndSeg has increased - this is only a problem if blocks are
         ; already installed.
