use e820 to get available memory

This commit is contained in:
pantonshire committed 2024-07-23 07:40:29 +01:00
1 parent 8e5761f610
commit fdf6d81b2e
4 files changed
+99 -10

No files matched your search

+4 -3
View File
@@ -3,8 +3,9 @@
; --------------------------------------------------------------------
; R | 0x000000 - 0x000400: real-mode interrupt vector table
; R | 0x000400 - 0x000500: bios data area
; U | 0x000500 - 0x007000: stack
; U | 0x007000 - 0x007c00: globals
; U | 0x000500 - 0x004000: stack
; U | 0x004000 - 0x006a00: globals
; U | 0x006a00 - 0x007c00: memory map
; U | 0x007c00 - 0x007e00: boot sector
; U | 0x007e00 - 0x080000: conventional usable memory
; R | 0x080000 - 0x0a0000: extended bios data area (maximum possible size)
@@ -29,7 +30,7 @@ main:
mov ds, ax
mov es, ax
; Put the stack base at 0x7000.
; Put the stack base at 0x4000.
; Stack grows high->low, so we'll grow away from our globals and program text.
mov ss, ax
mov bp, STACK_BASE