Mail Archives: djgpp/2000/03/15/20:59:28
On Wed, 15 Mar 2000, Michael Tippach wrote:
> > Not before it does quite a bit of trickery to get things to their
> > normal state again.
>
> Cleaning up the artificial condition created to trigger the exception is
> not what I call trickery but a necessary step.
``Necessary'' does not contradict ``tricky''. I said ``tricky'' because
the code isn't easy to get right. Clearly, a vanilla C code cannot run
from the exception handler before it restores the normal execution
environment. So generating an exception is only half of the job,
albeit an important half.
> > For fake exceptions triggered
> > by deliberately lowering the DS limit, this is easily done, since we
> > lowered the limit ourselves. For real exceptions, it's not so easy.
>
> That is true. Though I fail to see the relevance for this as we were
> always talking about deliberately causing exceptions in either case.
The relevance is that checking the limit against 4KB is much easier than
to look at all the other possible causes of real exceptions.
> Personally, I don't use DJGPP for I find the non- flat
> memory model a bit offensive.
I rather find it defensive (pun intended). It saves many a hacker from
him/herself.
> > > it takes 3 more lines of assembly code to detect NT.
> >
> > That's not really true, especially now that you need to distinguish
> > between NT and W2K.
>
> So does W2K return a different value than 0x3205 from function 0x3306?
No, it reports the same value, but behaves differently.
> Well, make it 5 lines of code instead of 3, in that case.
Please show us those 5 lines. It will help DJGPP tremendously, since
currently I cannot find any way of telling NT from W2K.
- Raw text -