summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-10-24 16:03:23 +0200
committerMichal Idziorek <m.i@gmx.at>2014-10-24 16:03:23 +0200
commit03cb792d510a067d4ffead2c8088ee953d70c2cb (patch)
treecdd53f342c8679e3d1ebdf8dd19534c9157b6ce5 /boot
parent610cfb4cee7ca3f35f642eeb06de2c710ab67754 (diff)
Minor changes/fixes in bootloader
Diffstat (limited to 'boot')
-rw-r--r--boot/disk_load_16.asm20
-rw-r--r--boot/stage2.asm17
2 files changed, 23 insertions, 14 deletions
diff --git a/boot/disk_load_16.asm b/boot/disk_load_16.asm
index 5eb43a9..ae34360 100644
--- a/boot/disk_load_16.asm
+++ b/boot/disk_load_16.asm
@@ -54,11 +54,20 @@ disk_load_lba:
pusha
mov bx,es
+ ;mov al,bh
+ ;call print_hex_byte
+
+ ;mov al,bl
+ ;call print_hex_byte
+
+ mov bx,[LBA]
+
mov al,bh
call print_hex_byte
mov al,bl
call print_hex_byte
+
popa
;--
@@ -79,16 +88,17 @@ disk_load_lba:
mov bx,es
add bx,0x0800
- cmp bx,0x9000
- je disk_load_finish
-
- mov es,bx
- mov bx,0
mov ax,[LBA]
add ax,64 ; 64 sectors = 0x2000*4 bytes ;16 sectors this is 0x200*0x10 butes
mov [LBA],ax
+ cmp bx,0x9000
+ je disk_load_finish
+
+ mov es,bx ;next target es:bx
+ mov bx,0
+
jmp next_sectors_lba
;#######################
diff --git a/boot/stage2.asm b/boot/stage2.asm
index 9dd00bc..9a1c74c 100644
--- a/boot/stage2.asm
+++ b/boot/stage2.asm
@@ -39,7 +39,7 @@
;
MEMMAP_SIZE_OFFSET equ 0x7c00
MEMMAP_OFFSET equ 0x7c01
-VESA_MODES equ 0x8300
+VESA_MODES equ 0x8300 ; do NOT overwrite yourself! be careful!
VESA_MODE_INFO equ 0x8400
VESA_MODE_SELECT equ 0x4114
;
@@ -174,12 +174,12 @@ boot_32_pm:
je finish_load
; show KERNEL CHUNK value
- push edx ; persist edx for some reason!?
- mov edx,0
- mov dx,[KERNEL_CHUNK]
- mov ecx,2*24*80
- call print_hex_pm
- pop edx
+; push edx ; persist edx for some reason!?
+; mov edx,0
+; mov dx,[KERNEL_CHUNK]
+; mov ecx,2*24*80
+; call print_hex_pm
+; pop edx
; here we actually do copy the chunk into ext mem!
@@ -205,11 +205,10 @@ boot_32_pm:
finish_load:
;
-
; call kernel!
mov eax,0 ;tell the kernel
; we are the booting processor
- call 0x100000 ;jump into our Kernel!
+ jmp 0x100000 ;jump into our Kernel!
[bits 16]