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. Regards ________________________________ From: David V <microbrix@gmail.com> To: AVR-Chat@yahoogroups.com Sent: Wednesday, 21 March 2012, 5:56 Subject: [AVR-Chat] Negarive numbers in .db statements All this time working with the AVR, and I've never had to do this... I need a way to change the sign on a term in a .db statement. Something like this: (which does not work..) .equ SignBit = -1; .db Thing,(Thing + (3*SignBit)), (Thing - (3*SignBit)), Thing .and so on.. Otherwise, I'm going to be forced to do an annoyingly large amount of hand editing data files. :P Any pointers? [Non-text portions of this message have been removed]
Message
Re: [AVR-Chat] Negarive numbers in .db statements
2012-03-21 by STEVEN HOLDER
Attachments
- No local attachments were found for this message.