summaryrefslogtreecommitdiff
path: root/boot2/stage2.asm
diff options
context:
space:
mode:
Diffstat (limited to 'boot2/stage2.asm')
-rw-r--r--boot2/stage2.asm6
1 files changed, 4 insertions, 2 deletions
diff --git a/boot2/stage2.asm b/boot2/stage2.asm
index ad1e4ea..3a469e8 100644
--- a/boot2/stage2.asm
+++ b/boot2/stage2.asm
@@ -42,6 +42,7 @@ MEMMAP_OFFSET equ 0x7c01
VESA_MODES equ 0x9300 ; do NOT overwrite yourself! be careful!
VESA_MODE_INFO equ 0x9400
VESA_MODE_SELECT equ 0x4114
+CHUNKS_TO_LOAD equ 0x0a ;number of 0x8000 * 512 byte chunks to load into ram
;
jmp boot_16 ;start boot process
@@ -145,7 +146,7 @@ kernel_load:
; init vesa on last iteration!
mov ax,[KERNEL_CHUNK]
- cmp ax,0x5
+ cmp ax,(CHUNKS_TO_LOAD-1)
jne skip_vesa_init
%ifndef FOOLOS_CONSOLE
@@ -177,7 +178,8 @@ boot_32_pm:
mov [KERNEL_CHUNK],ax
;check if all chunkgs loaded (hardcoded to 0x6 for a start)
- cmp ax,0x6
+ ;each chunk is 0x8000 * 15 bytes
+ cmp ax,CHUNKS_TO_LOAD
je finish_load
; show KERNEL CHUNK value