diff options
Diffstat (limited to 'boot2')
| -rw-r--r-- | boot2/disk_load_16.asm | 2 | ||||
| -rw-r--r-- | boot2/stage2.asm | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/boot2/disk_load_16.asm b/boot2/disk_load_16.asm index 52912f4..f326bec 100644 --- a/boot2/disk_load_16.asm +++ b/boot2/disk_load_16.asm @@ -90,7 +90,7 @@ disk_load_lba: add bx,0x0800 mov ax,[LBA] - add ax,64 ; 64 sectors = 0x2000*4 bytes ;16 sectors this is 0x200*0x10 butes + add ax,64 ; 64 sectors = 0x2000*4 bytes mov [LBA],ax cmp bx,0x9000 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 |
