From 07795ca0c0719fe94fc06c43671e51c1cf60023d Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Sun, 31 Aug 2014 15:56:45 +0200 Subject: Minor changes of comments in mbr.asm --- boot/mbr.asm | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/boot/mbr.asm b/boot/mbr.asm index 4a75e3e..9076915 100644 --- a/boot/mbr.asm +++ b/boot/mbr.asm @@ -5,9 +5,12 @@ ; So we have just been loaded by the BIOS and are in 16-bits real mode! ; Now the following work will bee accomplished (chronologically): ; +; NOTE: this should not exceed 446 bytes +; (otherwise it does not work on my Acer Aspire) +; ; * BOOT_DRIVE set ; -; * 50 sectors of our kernel loaded at KERNEL_OFFSET from floppy +; * 52 sectors of our kernel loaded at KERNEL_OFFSET from floppy ; ; * memory map made available at MEMMAP_OFFSET ; (check at MEMMEP_SIZE_OFFSET for number of entries) @@ -20,16 +23,15 @@ ; ; * 32-bit protected mode set up. ; -; * esp set to 0x90000 (Todo: take care of it!?) -; -; * A20 gate opened (Todo: really necessary?) +; * esp set to 0x90000 ; -; * PICs configured +; * A20 gate opened ; ; * and finally we will jump into the C world to kernel_main() ! ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;we want 16-bit instructions, before we switch to 32-bit protected mode. [bits 16] @@ -101,17 +103,12 @@ boot_16: ; ; ;remember BOOT_DRIVE (as was set by BIOS) mov [BOOT_DRIVE],dl -; mov bx, BOOT_DRIVE -; call print_string ; ; ;Load the KERNEL (52 sectors starting at sector 2) mov bx,KERNEL_OFFSET mov dh, 52 mov dl, [BOOT_DRIVE] call disk_load - - mov bx, KERNEL_OFFSET - call print_string ; ; ;get memory map from bios before we enter 32 bit protected mode @@ -120,7 +117,7 @@ boot_16: mov di,MEMMAP_OFFSET call BiosGetMemoryMap ; this will also put the number of entries ; ; of the memory map at MEMMAP_SIZE_OFFSET -; + ;a20check: ; ; mov bx, CHECK_A20 @@ -129,7 +126,7 @@ boot_16: ; call check_a20 ; cmp ax,0 ; je a20check ;hang if a20 is disabled! -; + ; ;VESA: also setup vesa stuff before entering 32 bit protected mode call VesaSetup ; -- cgit v1.2.3