Mail Archives: djgpp-workers/2002/07/21/14:50:49
Hello.
Charles Sandmann wrote:
> If the cli fix doesn't work then that means good old NT 4 doesn't even
> virtualize the cli, it just ignores it ...
>
> Does this version crash? It disables the keyboard hooking. This might
> be a long term fix. But in the meantime, it seems that unixy sbrk under
> NT 4.0 is just badly broken, thanks to MS bugz
No, the new version doesn't crash. I tested with and without the cli fix. (It
was in my tree anyway, when I started testing.) Both worked fine. Here's the
output:
bash-2.04$ ./usbr2-uf 100 500 1000 10000 100
My starting base address is 0x020e0000, istate=1
sbrk(102400)...(press a key)
returned 0x000983c0, new base is 0x02180000, istate=1
sbrk(512000)...(press a key)
returned 0x000b13c0, new base is 0x02240000, istate=1
sbrk(1024000)...(press a key)
returned 0x0012e3c0, new base is 0x02370000, istate=1
sbrk(10240000)...(press a key)
returned 0x002283c0, new base is 0x025a0000, istate=1
sbrk(102400)...(press a key)
returned 0x00bec3c0, new base is 0x03190000, istate=1
bash-2.04$ ./usbr2-f 100 500 1000 10000 100
My starting base address is 0x020e0000, istate=1
sbrk(102400)...(press a key)
returned 0x000983b8, new base is 0x02180000, istate=1
sbrk(512000)...(press a key)
returned 0x000b13b8, new base is 0x02240000, istate=1
sbrk(1024000)...(press a key)
returned 0x0012e3b8, new base is 0x02370000, istate=1
sbrk(10240000)...(press a key)
returned 0x002283b8, new base is 0x025a0000, istate=1
sbrk(102400)...(press a key)
returned 0x00bec3b8, new base is 0x03190000, istate=1
usbr2-uf is without the cli fix; usbr2-f is with the cli fix.
> #include <stdio.h>
> #include <stdlib.h>
> #include <unistd.h>
> #include <crt0.h>
> #include <sys/nearptr.h>
> #include <dpmi.h>
>
> int _crt0_startup_flags = _CRT0_FLAG_UNIX_SBRK;
>
> int main(int argc, char** argv) {
> int i,j;
>
> __djgpp_exception_toggle();
> printf("My starting base address is 0x%8.8x, istate=%d\n",
> __djgpp_base_address,__dpmi_get_virtual_interrupt_state());
>
> for(i=1;i<argc;i++) {
> j = 1024*atoi(argv[i]);
> if(j > 0) {
> printf("sbrk(%d)...(press a key)\n",j);
> getkey();
> j = (int)sbrk(j);
> printf("returned 0x%8.8x, new base is 0x%8.8x, istate=%d\n",j,
> __djgpp_base_address,__dpmi_get_virtual_interrupt_state());
> }
> }
> return 0;
> }
>
> Thanks for looking at this
You're welcome. Sorry it took me so long to get round to looking at this.
Running the tests is the easy part. 8) Thanks for the help!
Thanks, bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -