No longer include duplicate execrh, asmsupt, and u8m/d functions for the

init text in the Watcom compiled kernel, since they can be called "near"
in the resident code.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@861 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2004-04-10 15:11:16 +00:00
parent 147f4069e4
commit dd6ace383a
5 changed files with 25 additions and 20 deletions

View File

@ -34,6 +34,14 @@
; $Id$ ; $Id$
; ;
%ifdef WATCOM
%ifdef _INIT
%define WATCOM_INIT ; no seperate init segment for watcom.
%endif
%endif
%ifndef WATCOM_INIT
%include "segs.inc" %include "segs.inc"
%ifdef _INIT %ifdef _INIT
@ -530,3 +538,4 @@ strncmp_done:
ror ah,1 ror ah,1
strncmp_done2: jmp pascal_return strncmp_done2: jmp pascal_return
%endif

View File

@ -81,7 +81,11 @@ segment HMA_TEXT
EXECRH: EXECRH:
EXECRHM EXECRHM
%ifndef WATCOM
segment INIT_TEXT segment INIT_TEXT
INIT_EXECRH: INIT_EXECRH:
EXECRHM EXECRHM
%endif

View File

@ -34,6 +34,7 @@ extern struct _KernelConfig InitKernelConfig;
*/ */
#define printf init_printf #define printf init_printf
#define sprintf init_sprintf #define sprintf init_sprintf
#ifndef __WATCOMC__
#define execrh init_execrh #define execrh init_execrh
#define memcpy init_memcpy #define memcpy init_memcpy
#define fmemcpy init_fmemcpy #define fmemcpy init_fmemcpy
@ -44,6 +45,7 @@ extern struct _KernelConfig InitKernelConfig;
#define strcpy init_strcpy #define strcpy init_strcpy
#define strlen init_strlen #define strlen init_strlen
#define fstrlen init_fstrlen #define fstrlen init_fstrlen
#endif
#define open init_DosOpen #define open init_DosOpen
/* execrh.asm */ /* execrh.asm */
@ -65,16 +67,16 @@ char * ASMPASCAL strchr(const char *s, int ch);
/* bx, cx, dx and es not used or clobbered for all asmsupt.asm functions except /* bx, cx, dx and es not used or clobbered for all asmsupt.asm functions except
(f)memchr/(f)strchr (which clobber dx) */ (f)memchr/(f)strchr (which clobber dx) */
#pragma aux (pascal) pascal_ax modify exact [ax] #pragma aux (pascal) pascal_ax modify exact [ax]
#pragma aux (pascal_ax) init_memset #pragma aux (pascal_ax) memset
#pragma aux (pascal_ax) init_fmemset #pragma aux (pascal_ax) fmemset
#pragma aux (pascal_ax) init_memcpy #pragma aux (pascal_ax) memcpy
#pragma aux (pascal_ax) init_fmemcpy #pragma aux (pascal_ax) fmemcpy
#pragma aux (pascal_ax) init_memcmp modify nomemory #pragma aux (pascal_ax) memcmp modify nomemory
#pragma aux (pascal_ax) init_fmemcmp modify nomemory #pragma aux (pascal_ax) fmemcmp modify nomemory
#pragma aux (pascal_ax) init_strcpy #pragma aux (pascal_ax) strcpy
#pragma aux (pascal_ax) init_strlen modify nomemory #pragma aux (pascal_ax) strlen modify nomemory
#pragma aux (pascal_ax) init_fstrlen modify nomemory #pragma aux (pascal_ax) fstrlen modify nomemory
#pragma aux (pascal) init_strchr modify exact [ax dx] nomemory #pragma aux (pascal) strchr modify exact [ax dx] nomemory
#endif #endif
#undef LINESIZE #undef LINESIZE

View File

@ -201,15 +201,6 @@ cont: ; Now set up call frame
mov es,ax mov es,ax
jmp _FreeDOSmain jmp _FreeDOSmain
%ifdef WATCOM
global _IU4M
_IU4M:
LMULU
global _IU4D
_IU4D:
LDIVMODU
%endif
segment INIT_TEXT_END segment INIT_TEXT_END

View File

@ -64,5 +64,4 @@ MATH_INSERT=+i4m
ALLCFLAGS=-I..\hdr $(TARGETOPT) $(ALLCFLAGS)-zq-os-s-e5-j-zl-zp1-wx-we-zgf-zff-r ALLCFLAGS=-I..\hdr $(TARGETOPT) $(ALLCFLAGS)-zq-os-s-e5-j-zl-zp1-wx-we-zgf-zff-r
INITCFLAGS=$(ALLCFLAGS)-ntINIT_TEXT-gTGROUP-ndI INITCFLAGS=$(ALLCFLAGS)-ntINIT_TEXT-gTGROUP-ndI
CFLAGS=$(ALLCFLAGS)-ntHMA_TEXT CFLAGS=$(ALLCFLAGS)-ntHMA_TEXT
INITPATCH=..\utils\patchobj __U4D=_IU4D __U4M=_IU4M