Nyanix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit 8b1284f707d59a0d5003883752977063e2bc9047
parent 1299fd17e0598baa67ff48fda567b95b99a3e46a
Author: Dani Frisk <dani@silverskin.fi>
Date:   Tue, 13 Nov 2018 21:20:05 +0200

Minor update, bugfixes

Diffstat:
Makefile | 2+-
src/boot_early/boot.s | 4+---
src/main/main_loader.s | 13+++++--------
3 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile @@ -21,7 +21,7 @@ clean: debug: $(as) $(asflags) -g -o $(target) $(entry) -qemu: clean debug +qemu: qemu-system-i386 -d guest_errors $(target) install: diff --git a/src/boot_early/boot.s b/src/boot_early/boot.s @@ -13,7 +13,7 @@ org 0x7c00 bits 16 align 4 -%define SECTOR_COUNT 5 +%define SECTOR_COUNT 3 ; clearing out CS jmp 0x0000:start @@ -129,6 +129,4 @@ dw 0xAA55 %include "src/boot_early/second_stage.s" -times (1024 * SECTOR_COUNT) - ($-$$) db 0 - diff --git a/src/main/main_loader.s b/src/main/main_loader.s @@ -19,8 +19,6 @@ ; Variables needed for kernel loading process. ; ; =========================================================================== ; -kernel_entry_address equ 0x1000 - sectors_remaining dw 1 ; the amount of sectors to load kernel_sectors_loaded dw 0 @@ -76,7 +74,7 @@ main_loader: ; disk read is finished, time for relocation. mov esi, kernel_entry_address - mov edi, 0x20000 + mov edi, 0x10000 xor ecx, ecx mov cx, word [kernel_sectors_loaded] imul ecx, 1024 @@ -93,11 +91,9 @@ main_loader: mov eax, cr0 or al, 1 mov cr0, eax - jmp .hang -.hang: - cli - hlt - jmp .hang + + ; jump to entry of kernel + jmp edi .fail: mov esi, msg_kernel_not_found @@ -164,3 +160,4 @@ load_sectors: %endif +kernel_entry_address: