But before doing so I would like to ask newsgroup members who may have
taken a similiar path, for any comments regarding their successes and
failures.
Questions I have in mind are:-
1). What DOS extender worked best for you?
2). Can one still do remote debugging? That is does /tr=cw and /tr=par
for example, coexist?
3). Any traps/gotchas for young (old) players?
Regards,
davidm
In current distribution of OpenWatcom You have a Dos32 extender.
After 7 years of playing with DOS4GW, Causeway, PMW and Dos32
by me a winner is.... Dos32.
--
================================
Leszek KUBRAK
in...@infokub.com.pl
I have ported most of my personal collection of DJGPP programs to
compile with both DJGPP & OW.
The DJGPP programs work with PMODEDJ and CWSDPMI.
The OW programs work with PMODEW and DOS4GW.
DJGPP has nice wrappers for DPMI calls as part of the compiler.
OW is a bit more rough. The first problem in converting RM to PM
programs is usually due to the OW dpmi servers. Usually, for RM dos
you can use int86 and int86x as described. For PM, the int386 works
like int86 for dos. However, my experience is that the PM int386x doesn't
work all the time due to the way PMODEW & DOS4GW implement
return calls to DOS. For example, Int 2f function calls can't usually be
called
directly with int386x. You have to use int386x to call the DPMI function
0x0300 "simulate real mode interrupt." You'll need to define the RMI struct
to
due this (below and in OW code, but not in any include).
Also, I've found memcpy works well for PM, but movedata works well for RM.
DJGPP has a small RM memory area allocated called __tb. This doesn't
exist in OW so you have to allocate it yourself.
Rod Pemberton
(sorry, no email at the moment...)
PS,
Below is a lfn 0x71a0 function, and relevant other portions, for OW & DJGPP.
(There may be a few things missing since I ripped it from one of my ported
programs)
#ifdef __DJGPP__
#include <dir.h>
#include <crt0.h>
#include <dpmi.h>
#include <go32.h>
#include <libc/dosio.h>
#include <sys/stat.h>
#include <sys/movedata.h>
__dpmi_regs r;
#endif
#ifdef __WATCOMC__
#include <i86.h>
#include <direct.h>
#include <sys/types.h>
union REGS r;
struct SREGS s;
struct {
long EDI,ESI,EBP,rsvd,EBX,EDX,ECX,EAX;
short flags,ES,DS,FS,GS,IP,CS,SP,SS;
} RMI;
void *tb;
unsigned short sel;
#endif
#ifdef __WATCOMC__
r.w.ax=0x0100; /* allocate dos memory, no __tb in Watcom */
r.w.bx=0x40;
int386(0x31,&r,&r);
sel = r.w.dx;
tb = (void *)(r.w.ax<<4);
#endif
#define OFFS 261
int lfn_71A0(char *mpath) /* used to check if an LFN driver is installed */
{
#ifdef __DJGPP__
dosmemput(mpath, 32, __tb);
r.x.ax = 0x71a0;
r.x.ds = __tb_segment;
r.x.dx = __tb_offset;
r.x.es = r.x.ds;
r.x.di = r.x.dx+OFFS;
r.x.cx = 32;
r.x.flags |= 1;
__dpmi_int(0x21, &r);
dosmemget(__tb+OFFS, 32, mpath);
if (r.x.bx&0x4000)
return(1);
return(0);
#endif
#ifdef __WATCOMC__
memcpy(tb,mpath,32);
RMI.EAX = 0x71a0;
RMI.DS = (unsigned long)tb>>4;
RMI.EDX = 0;
RMI.ES = RMI.DS;
RMI.EDI = RMI.EDX+OFFS;
RMI.ECX = 32;
RMI.flags = INTR_CF; /* set carry */
r.w.ax=0x0300; /* simulate real mode interrupt */
r.h.bl=0x21;
r.h.bh=0;
r.w.cx=0;
s.es=FP_SEG(&RMI);
r.x.edi=FP_OFF(&RMI);
int386x(0x31,&r,&r,&s);
memcpy(mpath,(void *)((unsigned long)tb+OFFS),32);
if (RMI.EBX&0x4000)
return(1);
return(0);
#endif
}
"Davidm" <dav...@dge.com.au> wrote in message
news:cjg8np$195$1...@www1.scitechsoft.com...