Update BOOT_DATA structure and use it instead of all the BOOT_* vars.

git-svn-id: svn://kolibrios.org@7132 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
2017-12-17 02:12:53 +00:00
parent b00728a5d1
commit 368d42ffae
18 changed files with 192 additions and 204 deletions

View File

@@ -17,8 +17,8 @@ $Revision$
xor ebx, ebx
mov es, bx
mov ds, bx
mov di, BOOT_MEMMAP_BLOCKS
mov [BOOT_MEMMAP_BLOCK_CNT], ebx ; no blocks yet
mov di, BOOT_LO.memmap_blocks
mov [BOOT_LO.memmap_block_cnt], ebx ; no blocks yet
mov ecx, 20
mov edx, 'PAMS' ; 'SMAP'
int 15h
@@ -28,13 +28,13 @@ $Revision$
e820_mem_loop:
; cmp byte [di+16], 1 ; ignore non-free areas
; jnz e820_mem_next
inc byte [BOOT_MEMMAP_BLOCK_CNT]
inc byte [BOOT_LO.memmap_block_cnt]
add di, sizeof.e820entry
e820_mem_next:
; consequent calls to fn E820
test ebx, ebx
jz e820_test_done
cmp byte [BOOT_MEMMAP_BLOCK_CNT], MAX_MEMMAP_BLOCKS
cmp byte [BOOT_LO.memmap_block_cnt], MAX_MEMMAP_BLOCKS
jz e820_test_done
mov eax, 0xE820
int 15h