diff --git a/kernel/asmsupt.asm b/kernel/asmsupt.asm index c661b8a..92286b3 100644 --- a/kernel/asmsupt.asm +++ b/kernel/asmsupt.asm @@ -34,6 +34,14 @@ ; $Id$ ; +%ifdef WATCOM +%ifdef _INIT +%define WATCOM_INIT ; no seperate init segment for watcom. +%endif +%endif + +%ifndef WATCOM_INIT + %include "segs.inc" %ifdef _INIT @@ -530,3 +538,4 @@ strncmp_done: ror ah,1 strncmp_done2: jmp pascal_return +%endif diff --git a/kernel/execrh.asm b/kernel/execrh.asm index 66d0d63..87ce4c9 100644 --- a/kernel/execrh.asm +++ b/kernel/execrh.asm @@ -81,7 +81,11 @@ segment HMA_TEXT EXECRH: EXECRHM +%ifndef WATCOM + segment INIT_TEXT INIT_EXECRH: EXECRHM + +%endif diff --git a/kernel/init-mod.h b/kernel/init-mod.h index 0e32ba0..6c15814 100644 --- a/kernel/init-mod.h +++ b/kernel/init-mod.h @@ -34,6 +34,7 @@ extern struct _KernelConfig InitKernelConfig; */ #define printf init_printf #define sprintf init_sprintf +#ifndef __WATCOMC__ #define execrh init_execrh #define memcpy init_memcpy #define fmemcpy init_fmemcpy @@ -44,6 +45,7 @@ extern struct _KernelConfig InitKernelConfig; #define strcpy init_strcpy #define strlen init_strlen #define fstrlen init_fstrlen +#endif #define open init_DosOpen /* 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 (f)memchr/(f)strchr (which clobber dx) */ #pragma aux (pascal) pascal_ax modify exact [ax] -#pragma aux (pascal_ax) init_memset -#pragma aux (pascal_ax) init_fmemset -#pragma aux (pascal_ax) init_memcpy -#pragma aux (pascal_ax) init_fmemcpy -#pragma aux (pascal_ax) init_memcmp modify nomemory -#pragma aux (pascal_ax) init_fmemcmp modify nomemory -#pragma aux (pascal_ax) init_strcpy -#pragma aux (pascal_ax) init_strlen modify nomemory -#pragma aux (pascal_ax) init_fstrlen modify nomemory -#pragma aux (pascal) init_strchr modify exact [ax dx] nomemory +#pragma aux (pascal_ax) memset +#pragma aux (pascal_ax) fmemset +#pragma aux (pascal_ax) memcpy +#pragma aux (pascal_ax) fmemcpy +#pragma aux (pascal_ax) memcmp modify nomemory +#pragma aux (pascal_ax) fmemcmp modify nomemory +#pragma aux (pascal_ax) strcpy +#pragma aux (pascal_ax) strlen modify nomemory +#pragma aux (pascal_ax) fstrlen modify nomemory +#pragma aux (pascal) strchr modify exact [ax dx] nomemory #endif #undef LINESIZE diff --git a/kernel/kernel.asm b/kernel/kernel.asm index 8d803d8..21f399f 100644 --- a/kernel/kernel.asm +++ b/kernel/kernel.asm @@ -201,15 +201,6 @@ cont: ; Now set up call frame mov es,ax jmp _FreeDOSmain -%ifdef WATCOM -global _IU4M -_IU4M: - LMULU -global _IU4D -_IU4D: - LDIVMODU -%endif - segment INIT_TEXT_END diff --git a/mkfiles/watcom.mak b/mkfiles/watcom.mak index 68283e8..77a2615 100644 --- a/mkfiles/watcom.mak +++ b/mkfiles/watcom.mak @@ -64,5 +64,4 @@ MATH_INSERT=+i4m ALLCFLAGS=-I..\hdr $(TARGETOPT) $(ALLCFLAGS)-zq-os-s-e5-j-zl-zp1-wx-we-zgf-zff-r INITCFLAGS=$(ALLCFLAGS)-ntINIT_TEXT-gTGROUP-ndI CFLAGS=$(ALLCFLAGS)-ntHMA_TEXT -INITPATCH=..\utils\patchobj __U4D=_IU4D __U4M=_IU4M