Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Negarive numbers in .db statements

2012-03-21 by David VanHorn

On Wed, Mar 21, 2012 at 3:05 AM, STEVEN HOLDER
<s.holder123@btinternet.com> wrote:
> David,
>
> If you need to change the sign, you could cast the signbit as a signed char and xor with 0x80, which is the sign bit, would that do the trick as not quiet sure what you are trying to do.


That won't get it for me.
I'm trying to establish a distortion on some test case data, and I
need the distortion to be positive or negative..
In the truncated example I gave, if the distortion is "+3" then the
values might be something like

100,103,97,100

If the distortion is -3, then the values would be

100, 97, 103, 100

The thing is that I should be able to include a term like (Sign * Var)
in an addition, and have it work properly.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.