From e376f8ba7aa99c644ba481b2626cb2e4b66d5adc Mon Sep 17 00:00:00 2001 From: Filip <44641787+Filiprogrammer@users.noreply.github.com> Date: Mon, 17 Jul 2023 14:16:03 +0200 Subject: [PATCH] Support a bigger kernel file in stage2 bootloader Support loading a kernel file of up to 249KB in size by moving the stack farther away from the kernel file buffer. --- stage2_bootloader/boot2.asm | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/stage2_bootloader/boot2.asm b/stage2_bootloader/boot2.asm index f93f5a3..fec82fe 100644 --- a/stage2_bootloader/boot2.asm +++ b/stage2_bootloader/boot2.asm @@ -35,19 +35,11 @@ entry_point: mov ds, ax mov es, ax -;=====================================================HOTFIX============ -; mov ss, ax -; mov sp, 0xFFFF ; stack begins at 0xffff (downwards) - -; stack bei 0000:FFFF ? - -mov ax,0x1000 -mov ss,ax -xor sp,sp -dec sp -;=====================================================HOTFIX============ + mov ax, 0x3000 ; stack begins at 0x3FFFF (downwards) + mov ss, ax + mov sp, 0xFFFF - sti ; enable interrupts + sti ; enable interrupts A20: call EnableA20