diff --git a/src/kernel.ld b/src/kernel.ld index b95856d..b3174ba 100644 --- a/src/kernel.ld +++ b/src/kernel.ld @@ -1,5 +1,5 @@ SECTIONS { - .text 0x1000 : { + .text 0x50000 : { *(.text*); } .data : { diff --git a/src/stage1.asm b/src/stage1.asm index 4b0fa08..75865af 100644 --- a/src/stage1.asm +++ b/src/stage1.asm @@ -3,9 +3,8 @@ [global start] %define VIDMEM 0xb800 -%define KERNEL_LOC 0x1000 %define FILETAB_LOC 0x7000 ; TODO: Read kernel size and location from ft -%define KERNEL_SIZE 30; 15kB +%define KERNEL_SIZE 30 ; 15kB start: mov [driveNum], dl ; Store the drive number @@ -64,9 +63,9 @@ loadKernel: .read: ; Location - xor ax, ax + mov ax, 0x5000 ; Making es 0x5000 will load the kernel at 0x50000 mov es, ax - mov bx, KERNEL_LOC ; 2nd stage bootloader location + xor bx, bx ; CHS Location mov al, KERNEL_SIZE diff --git a/src/stage2.asm b/src/stage2.asm index e487faf..e9b4dcc 100644 --- a/src/stage2.asm +++ b/src/stage2.asm @@ -1,7 +1,7 @@ [bits 16] [org 0x7e00] -%define KERNEL_LOC 0x1000 +%define KERNEL_LOC 0x50000 %define VIDMEM 0xb800 start: @@ -372,7 +372,7 @@ DATA_SEG equ GDT.dataDescriptor - GDT.start ;; VBE Stuff ;; !! IF YOU WANT TO SELECT ANY VALUE IN THE SETUP, SET THESE TO ZERO !! -width: dw 0 ;1920 +width: dw 1920 height: dw 1080 bpp: db 32