summaryrefslogtreecommitdiff
path: root/boot/mbr.asm
diff options
context:
space:
mode:
Diffstat (limited to 'boot/mbr.asm')
-rw-r--r--boot/mbr.asm41
1 files changed, 18 insertions, 23 deletions
diff --git a/boot/mbr.asm b/boot/mbr.asm
index 83edefc..bb1fc2b 100644
--- a/boot/mbr.asm
+++ b/boot/mbr.asm
@@ -1,39 +1,34 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
-; FoolOS Boot Loader
+; THE FOOL-BOOT-LOADER
;
-; Copyright 2014 M.Idziorek <m.i@gmx.at>
-;
-; we have just been loaded by the BIOS and are in 16-bits real mode!
-;
-; THIS IS THE CENTRAL FILE OF THE BOOTLOADER,
-;
-; after we are through,
-; the following work has been accomplished (chronologically):
+; So we have just been loaded by the BIOS and are in 16-bits real mode!
+; Now the following work will bee accomplished (chronologically):
;
-; * BOOT_DRIVE is set
+; * BOOT_DRIVE set
;
-; * 50 sectors of our kernel are loaded at KERNEL_OFFSET from floppy
+; * 50 sectors of our kernel loaded at KERNEL_OFFSET from floppy
;
-; * memoru map is available at MEMMAP_OFFSET
-; (look at MEMMEP_SIZE_OFFSET for number of entries)
+; * memory map made available at MEMMAP_OFFSET
+; (check at MEMMEP_SIZE_OFFSET for number of entries)
;
-; * the vesa mode specified by VESA_MODE_SELECT is set up
-; (at VESA_MODES, and VESA_MODE_INFO additional info structs are available)
+; * the VESA mode specified by VESA_MODE_SELECT will be set up
+; (check at VESA_MODES, and VESA_MODE_INFO
+; for additional information)
;
; * interrupts disabled
;
-; * 32-bit protected mode was set up.
+; * 32-bit protected mode set up.
;
; * esp set to 0x90000 (Todo: take care of it!?)
;
-; * A20 gate is open
+; * A20 gate opened (Todo: really necessary?)
;
-; * PICs are configured
+; * PICs configured
;
-; * we are inside the C kernel!
+; * 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]
@@ -104,9 +99,9 @@ boot_16:
;remember BOOT_DRIVE (as was set by BIOS)
mov [BOOT_DRIVE],dl
- ;Load the KERNEL (50 sectors starting at sector 2)
+ ;Load the KERNEL (52 sectors starting at sector 2)
mov bx,KERNEL_OFFSET
- mov dh, 50 ;50 sectors!
+ mov dh, 52
mov dl, [BOOT_DRIVE]
call disk_load