From 86fb4bfe839707e1d300b65048ebf084054cfa9b Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Fri, 4 Sep 2015 06:40:05 +0000 Subject: [PATCH] Kernel: fix stack selector git-svn-id: svn://kolibrios.org@5790 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/boot/bootcode.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/trunk/boot/bootcode.inc b/kernel/trunk/boot/bootcode.inc index 5223329483..1c84ab62d7 100644 --- a/kernel/trunk/boot/bootcode.inc +++ b/kernel/trunk/boot/bootcode.inc @@ -176,7 +176,7 @@ if defined extended_primary_loader mov [bootfs], bx ; set up stack - mov ax, TMP_STACK_TOP shr 16 + mov ax, (TMP_STACK_TOP and 0xF0000) shr 4 mov ss, ax mov sp, TMP_STACK_TOP and 0xFFFF @@ -293,7 +293,7 @@ else no_hd_load: ; set up stack - mov ax, TMP_STACK_TOP shr 16 + mov ax, (TMP_STACK_TOP and 0xF0000) shr 4 mov ss, ax mov sp, TMP_STACK_TOP and 0xFFFF ; set up segment registers