Skip to content

Commit

Permalink
kernel: move HMA fillers to HMA_TEXT_START
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stsp committed Nov 30, 2023
1 parent 0430a00 commit 0df1a4a
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions kernel/kernel.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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_
Expand All @@ -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
Expand Down

0 comments on commit 0df1a4a

Please sign in to comment.