summaryrefslogtreecommitdiff
path: root/boot/mbr.asm
diff options
context:
space:
mode:
Diffstat (limited to 'boot/mbr.asm')
-rw-r--r--boot/mbr.asm20
1 files changed, 16 insertions, 4 deletions
diff --git a/boot/mbr.asm b/boot/mbr.asm
index 12b7707..d4dcbe5 100644
--- a/boot/mbr.asm
+++ b/boot/mbr.asm
@@ -26,16 +26,15 @@ KERNEL_OFFSET equ 0x1000
jmp boot_16 ;start boot process
;SOME Global Data, mainly strings
-STR_VERSION:
+;STR_VERSION:
; db "v0.2~",0
-STR_PROT:
+;STR_PROT:
; db "32-bit PM",0
-STR_LOADED:
+;STR_LOADED:
; db "loaded",0
BOOT_DRIVE:
db 0
-
;lets put our temporary GDT (Global Descriptor Table) here
%include "boot/GDT.asm"
@@ -81,6 +80,13 @@ boot_16:
; mov bx, STR_LOADED
; call print_string
+
+ ;get memory map from biso before we enter 32 bit protected mode
+ ; todo: how to set es!?!?
+ ;mov es,0
+ mov di,MEMMAP
+ call BiosGetMemoryMap
+
;finally lets enter Protected mode!!!
call switch_to_pm
@@ -88,6 +94,8 @@ boot_16:
[bits 32]
boot_32_pm:
+; we could do ALL This inside the kernel!!!
+
;print info message that we are in protected mode!
; mov ecx,160
; mov ebx,STR_PROT
@@ -105,6 +113,10 @@ boot_32_pm:
call KERNEL_OFFSET ;jump into our Kernel it
+db 'X'
+MEMMAP:
+
+
;idt_descriptor:
; dw idt_end-idt_start-1