From: chris doty Newsgroups: comp.os.msdos.djgpp Subject: Re: !!NEGATIVE NUMBERS IN ASM!! Pleez answer. Date: Wed, 18 Feb 1998 14:39:44 -0800 Organization: Worcester Polytechnic Institute Lines: 8 Message-ID: <34EB6330.2388@wpi.edu> References: <34EB3694 DOT 714183B6 AT mail DOT htk DOT fi> NNTP-Posting-Host: orz.res.wpi.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk > I just want to know, how I can change a number, which is negative, to > positive, > and in asm. I bet it can be done, but how? > I've got an almost ready cool demo-effect, but when I add two numbers > together, > the other one is negative, and I can't do anything about it. x86s have hardware support for flipping the sign. I believe mnemonic is NEG. This is equivelent to a NOT followed by an INC.