Good day, all:
OK, I gotta learn something about DOS programming. I have spent
a few hours on what I believe to be a very simple task...trying to
get a getdta() function (to acquire the disk transfer area) that will
work with Open Watcom. At this point, I'm pursuing it as a learning
tool! Also, I need it to help debug NTFS4DOS (I think).
TurboC++ appears to have functions for setdta() and getdta()
which I have been unable to find in Open Watcom.
I am learning (relearning) lots of fun stuff, primarily that I HATE
little-endian computers and have NEVER done any serious work
on a 16-bit system! (What do you mean a SHORT and an INT
have the same size? :-))
I did a lot of poking around and found one bit of "C" source code for
such a function:
#define DOS_GETDTA 0x2F00
[...]
static union REGS reg;
[...]
char *
getdta()
{
reg.x.ax = DOS_GETDTA;
reg.x.bx = 0;
reg.x.cx = 0;
reg.x.dx = 0;
intdos(®, ®);
return (reg.x.bx);
}
This does not look right at all. It may be 32-bit code. I have
hacked around with it for quite a while, unsuccessfully.
The Kernel interrupt handler for Interrupt 21 function 2F
boils down to (it's cool to have sources!):
lr.ES = FP_SEG(dta);
lr.BX = FP_OFF(dta);
[...]
fmemcpy(r, &lr, sizeof(lregs) - 4);
r->DS = lr.DS;
r->ES = lr.ES;
Is the return of a 16-bit value correct here? I am attempting
only to print out the dta values while using findfirst/findnext/unlink
to delete all the entries in a directory. It isn't working.
Do I need far pointers? I know how to declare them, but how
do I create one using two 16-bit chunks? Have I made some
other mistake?
Thanks! I appreciate the help!
Mark Bailey
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel