From c8a976eced96f3af4a17d756c34cdd566ffa8a9e Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Thu, 7 Aug 2014 03:01:23 +0200 Subject: optimized MBR and added memmap identification --- boot/mbr.asm | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'boot/mbr.asm') diff --git a/boot/mbr.asm b/boot/mbr.asm index a6dc876..12b7707 100644 --- a/boot/mbr.asm +++ b/boot/mbr.asm @@ -27,11 +27,12 @@ jmp boot_16 ;start boot process ;SOME Global Data, mainly strings STR_VERSION: - db "_<-Fool-Loader~0.0.13~",0 +; db "v0.2~",0 STR_PROT: - db "Entered 32-bit Protected Mode.",0 +; db "32-bit PM",0 STR_LOADED: - db "FoolOS Kernel Loaded.",0 +; db "loaded",0 + BOOT_DRIVE: db 0 @@ -42,7 +43,7 @@ BOOT_DRIVE: %include "boot/common.asm" ;include 32-bit Protected Mode routines (print_string_pm,print_hex_pm) -%include "boot/common_pm.asm" +;%include "boot/common_pm.asm" ;include our routines for switching to 32-bit protected mode %include "boot/pm.asm" @@ -50,6 +51,9 @@ BOOT_DRIVE: ;pic mapping %include "boot/pic.asm" +;memory map +%include "boot/memmap.asm" + ;;;;;;;; BOOT 16-bit real ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;lets start @@ -64,8 +68,8 @@ boot_16: mov [BOOT_DRIVE],dl ;print FoolOS version info - mov bx, STR_VERSION - call print_string +; mov bx, STR_VERSION +; call print_string ;Load the KERNEL mov bx,KERNEL_OFFSET @@ -74,8 +78,8 @@ boot_16: call disk_load ;print info message that kernel was loaded - mov bx, STR_LOADED - call print_string +; mov bx, STR_LOADED +; call print_string ;finally lets enter Protected mode!!! call switch_to_pm @@ -85,9 +89,9 @@ boot_16: boot_32_pm: ;print info message that we are in protected mode! - mov ecx,160 - mov ebx,STR_PROT - call print_string_pm +; mov ecx,160 +; mov ebx,STR_PROT +; call print_string_pm ;enable A20 ;http://www.brokenthorn.com/Resources/OSDev9.html -- cgit v1.2.3