From d7ccb6187363684c69aa5d7f87ade44a31baf217 Mon Sep 17 00:00:00 2001 From: Jonathan Campbell Date: Tue, 31 Jul 2018 08:35:48 -0700 Subject: [PATCH] more --- tool/linker/ex9/common.mak | 5 ++++- tool/linker/ex9/drvc.c | 12 +++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tool/linker/ex9/common.mak b/tool/linker/ex9/common.mak index a57ce18a1..46e140089 100644 --- a/tool/linker/ex9/common.mak +++ b/tool/linker/ex9/common.mak @@ -15,11 +15,14 @@ TEST_EXE = $(SUBDIR)$(HPS)test.com DOSLIBLINKER_OFMT = -of com ! else TEST_EXE = $(SUBDIR)$(HPS)test.exe -TESTW_EXE = $(SUBDIR)$(HPS)testw.exe TESTF_EXE = $(SUBDIR)$(HPS)testf.exe TESTFF_EXE = $(SUBDIR)$(HPS)testff.exe TESTFC_EXE = $(SUBDIR)$(HPS)testfc.com DOSLIBLINKER_OFMT = -of exe + +# NTS: Open Watcom's linker does NOT handle this test case well +#TESTW_EXE = $(SUBDIR)$(HPS)testw.exe + ! endif !endif diff --git a/tool/linker/ex9/drvc.c b/tool/linker/ex9/drvc.c index de659388d..702fe41ca 100644 --- a/tool/linker/ex9/drvc.c +++ b/tool/linker/ex9/drvc.c @@ -11,14 +11,24 @@ void dos_putc(const char c); modify [ah] \ parm [dl] +#if defined(TINYMODE) void dos_puts(const char *p) { +#else +void dos_puts(const char far *p) { +#endif char c; while ((c = *p++) != 0) dos_putc(c); } +#if defined(TINYMODE) +# define DATA32_SCOPE extern unsigned long ex_data32; +#else +# define DATA32_SCOPE far +extern unsigned long far ex_data32; +#endif unsigned int near entry_c(void) { dos_puts(hello_world); @@ -30,7 +40,7 @@ unsigned int near entry_c(void) { * NTS: Open Watcom's Linker WILL NOT link this test properly, this test will fail. */ if (ex_data32 == 0x89ABCDEF) { dos_puts("EX_DATA32 YES\nEX_DATA32 string: "); - dos_puts((const char *)(&ex_data32) + 4ul); + dos_puts((const char DATA32_SCOPE *)(&ex_data32) + 4ul); dos_puts(crlf); } else {