Mail Archives: djgpp-workers/1996/04/14/12:46:40
What are the chances of the transfer buffer _not_ being aligned
on a paragraph? Aren't we just wasting time doing "& 15" all
other the library?
Another thing: is it valid for _any_ library function to call
malloc? If it is, then how about "...any library function
that would have been a syscall under Unix"?
Morten
Here is a rewritten write() function, that in theory should optimize
buffer use and transfer size when writing in text mode, and won't need
to call malloc() at all. Comments?
[...]
/* we now have a transfer buf stuffed with data; write it out */
r.x.ax = 0x4000;
r.x.bx = handle;
r.x.cx = bytes_in_tb;
r.x.dx = __tb & 15;
r.x.ds = __tb / 16;
__dpmi_int(0x21, &r);
- Raw text -