Mail Archives: djgpp/2000/03/08/07:46:32
On Tue, 7 Mar 2000, Campbell, Rolf [SKY:1U32:EXCH] wrote:
> > It is not necessary to zero-out regs when using __dpmi_int, since
> > __dpmi_int zeroes out the parts that need that.
>
> Yes, but I think it is a good practise in general because some
> interrupts act differently when other registers contain random values,
It's actually the other way around: one should NOT zero out registers
which are not documented as having any function with the specific
interrupt you are invoking. There's no guarantee that a value of zero
is less random than any other value, if the docs doesn't say what does
zero mean in your context.
So I think it is safer NOT to use memset than to use it.
- Raw text -