Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
joncampbell123 committed Jul 31, 2018
1 parent 1b15aae commit d7ccb61
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tool/linker/ex9/common.mak
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 11 additions & 1 deletion tool/linker/ex9/drvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 {
Expand Down

0 comments on commit d7ccb61

Please sign in to comment.