From 0df1a4af55ae07bcade9b094b42f9bac42d5c98b Mon Sep 17 00:00:00 2001 From: Stas Sergeev Date: Fri, 1 Dec 2023 01:12:02 +0500 Subject: [PATCH] kernel: move HMA fillers to HMA_TEXT_START This avoids the need for the kernel.o to be linked before other objects. It also wastes ~200 bytes of HMA, but we have no shortage of the HMA space. --- kernel/kernel.asm | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/kernel/kernel.asm b/kernel/kernel.asm index 95cb75a8..5e919ff2 100644 --- a/kernel/kernel.asm +++ b/kernel/kernel.asm @@ -735,6 +735,7 @@ segment DYN_DATA align 10h global _Dyn _Dyn: + times 10h db 0 ; guard space from prev sym markEndInstanceData: ; mark end of DOS data seg we say needs instancing @@ -759,21 +760,16 @@ _InitEnd: segment HMA_TEXT_START align 10h - times 10h db 0 ; guard space from prev sym - global __HMATextAvailable -__HMATextAvailable: global __HMATextStart __HMATextStart: + times 0xd0 db 0 ; filler [ffff:0..10000:c0] + ; reserve space for far jump to cp/m routine + times 5 db 0 + align 10h + global __HMATextAvailable +__HMATextAvailable: -; -; the HMA area is filled with 1eh+3(=sizeof VDISK) = 33 byte dummy data, -; so nothing will ever be below 0xffff:0031 -; segment HMA_TEXT -begin_hma: - times 10h db 0 ; filler [ffff:0..ffff:10] - times 20h db 0 - db 0 ; to minimize relocations global _DGROUP_ @@ -791,10 +787,6 @@ __U4D: LDIVMODU %endif - times 0xd0 - ($-begin_hma) db 0 - ; reserve space for far jump to cp/m routine - times 5 db 0 - ;End of HMA segment segment HMA_TEXT_END global __HMATextEnd