A poorly written OS for the x86 arch. (WIP)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
eOS/bootloader/bios/memory.asm

26 lines
564 B

; SRs to find memory size and leave it as a "note" for the kernel
3 years ago
; Descriptor Table for address ranges
map_phys_mem_init:
mov ebx, 0
map_phys_mem:
3 years ago
mov eax, 0xE820 ; Function code
; Tell the CPU about the descriptors location (ES:DI)
;mov es, addr_rng_dt_start
3 years ago
;mov di,
3 years ago
mov ecx, ADDR_RNG_DT_SIZE
mov edx, 'SMAP' ; Signature
int BIOS_PMEM_INT
3 years ago
3 years ago
ret
addr_rng_dt_start:
addr_rng_low: dd 0
addr_rng_high: dd 0
addr_rng_len_low: dd 0
addr_rng_len_high: dd 0
addr_rng_type: dd 0
addr_rng_dt_end:
3 years ago
ADDR_RNG_DT_SIZE equ addr_rng_dt_end - addr_rng_dt_start