delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/25/12:11:17

Mime-Version: 1.0
To: =?iso-8859-1?Q?=22S=E9rgio_Vale_e_Pace=22?= <space AT gold DOT com DOT br>,
djgpp AT delorie DOT com
From: Nate Eldredge <nate AT cartsys DOT com>
Subject: Re: bit tests in DJGPP assembler
Date: Mon, 25 May 1998 09:04:39 -0700
Message-ID: <19980525160426.AAE5973@ppp101.cartsys.com>

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



- Raw text -


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