Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" To: =?iso-8859-1?Q?=22S=E9rgio_Vale_e_Pace=22?= , djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: bit tests in DJGPP assembler Date: Mon, 25 May 1998 09:04:39 -0700 Message-ID: <19980525160426.AAE5973@ppp101.cartsys.com> Content-Transfer-Encoding: 8bit Precedence: bulk At 01:40 5/24/1998 -0300, Sérgio Vale e Pace wrote: >Hi Everybody, > I have a 10 byte matrix and I want to test each bit in this matrix, >all the 80. I'm trying to do that using the BT instruction in assembler, >using a index, and a memory location and when I try the memory location >first, (eg. bt (%eax), %di) I got a "instruction unknow" message from >the compiler inverting the operands (eg. bt %di, (%%eax)), I got a >Segment violation error. I think what you want is: btw %di, (%eax) This will test the 16-bit word at (%eax). Of course, make sure the registers have the right values. You could also try stepping through with a debugger. Nate Eldredge nate AT cartsys DOT com