delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/08/07:46:32

Date: Wed, 8 Mar 2000 11:56:28 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Campbell, Rolf [SKY:1U32:EXCH]" <moscoop AT americasm01 DOT nt DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Inline asm
In-Reply-To: <38C54243.DB343A69@americasm01.nt.com>
Message-ID: <Pine.SUN.3.91.1000308115609.6599H-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019