From 11e6ccefbfcde58de013c335795a2bc3ce902958 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Sun, 30 May 2004 19:31:07 +0000 Subject: [PATCH] high-part-of register save fixes from Lucho. Bump version to 2035. git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@971 6ac86273-5f31-0410-b378-82cca8765d1b --- docs/fdkernel.lsm | 4 ++-- hdr/stacks.inc | 14 ++++++++++++-- hdr/version.h | 8 ++++---- kernel/entry.asm | 2 +- kernel/inthndlr.c | 8 +++++++- kernel/io.asm | 1 + kernel/nlssupt.asm | 1 + 7 files changed, 28 insertions(+), 10 deletions(-) diff --git a/docs/fdkernel.lsm b/docs/fdkernel.lsm index c3b0f54..d9a21de 100644 --- a/docs/fdkernel.lsm +++ b/docs/fdkernel.lsm @@ -1,7 +1,7 @@ Begin3 Title: The FreeDOS Kernel -Version: 2.0.34 -Entered-date: 17 Apr 2004 +Version: 2.0.35 +Entered-date: 30 May 2004 Description: The FreeDOS Kernel. Keywords: kernel freedos dos msdos Author: (developers) diff --git a/hdr/stacks.inc b/hdr/stacks.inc index 129f34a..f3681b8 100644 --- a/hdr/stacks.inc +++ b/hdr/stacks.inc @@ -118,8 +118,8 @@ irp_hi equ 26 ; ; assumption: ; we have never seen MSVC to use anything but eax, ecx, edx, -; nor have we seen Borland C to use anything but eax, edx, -; so we only protect eax, ecx, edx to conserve stack space +; nor have we seen Borland C to use anything but eax, ebx, edx, +; so we only protect eax, ebx or ecx, edx to conserve stack space ; ; to save even more stack space, we save only HIGH part of regs ; at some expense of slower execution. it's easier anyway :-) @@ -149,8 +149,13 @@ irp_hi equ 26 %else push eax pop ax + %ifdef MSCL8 push ecx pop cx + %else ;BC5 + push ebx + pop bx + %endif push edx pop dx %endif @@ -165,8 +170,13 @@ irp_hi equ 26 %else push dx pop edx + %ifdef MSCL8 push cx pop ecx + %else ;BC5 + push bx + pop ebx + %endif push ax pop eax %endif diff --git a/hdr/version.h b/hdr/version.h index 8199d9f..98272d7 100644 --- a/hdr/version.h +++ b/hdr/version.h @@ -47,8 +47,8 @@ static BYTE *date_hRcsId = #define REVISION_MAJOR 1 #define REVISION_MINOR 1 -#define REVISION_SEQ 34 -#define BUILD "2034" +#define REVISION_SEQ 35 +#define BUILD "2035" #define SUB_BUILD "" -#define KERNEL_VERSION_STRING "1.1.34" /*#REVISION_MAJOR "." #REVISION_MINOR "." #REVISION_SEQ */ -#define KERNEL_BUILD_STRING "2034" /*#BUILD SUB_BUILD */ +#define KERNEL_VERSION_STRING "1.1.35" /*#REVISION_MAJOR "." #REVISION_MINOR "." #REVISION_SEQ */ +#define KERNEL_BUILD_STRING "2035" /*#BUILD SUB_BUILD */ diff --git a/kernel/entry.asm b/kernel/entry.asm index f1a3927..d0610fd 100644 --- a/kernel/entry.asm +++ b/kernel/entry.asm @@ -352,7 +352,7 @@ int21_exit_nodec: %ifdef WATCOM sub bp, 4 ; for fs and gs only %else - sub bp, 6 ; high parts of eax, ecx, edx + sub bp, 6 ; high parts of eax, ebx or ecx, edx %endif %endif diff --git a/kernel/inthndlr.c b/kernel/inthndlr.c index de55c2f..6cf6ab7 100644 --- a/kernel/inthndlr.c +++ b/kernel/inthndlr.c @@ -1635,7 +1635,13 @@ struct int2f12regs { #ifdef __WATCOMC__ /* UWORD gs, fs; ** GS/FS are protected through SI/DI */ #else - UWORD high_edx, high_ecx, high_eax; + UWORD high_edx, +#ifdef _MSC_VER + high_ecx, +#else /* __BORLANDC__ */ + high_ebx, +#endif + high_eax; #endif #endif UWORD es, ds; diff --git a/kernel/io.asm b/kernel/io.asm index 662d753..32d13af 100644 --- a/kernel/io.asm +++ b/kernel/io.asm @@ -29,6 +29,7 @@ ; %include "segs.inc" + %include "stacks.inc" extern ConTable:wrt LGROUP extern LptTable:wrt LGROUP diff --git a/kernel/nlssupt.asm b/kernel/nlssupt.asm index 233ea65..bd375b6 100644 --- a/kernel/nlssupt.asm +++ b/kernel/nlssupt.asm @@ -29,6 +29,7 @@ %include "segs.inc" + %include "stacks.inc" segment HMA_TEXT global _reloc_call_CharMapSrvc