# Forum: µC & Digital Electronics help about opcode

Rate this post
 0 ▲ useful ▼ not useful
hello
i have an opcode of BNE and i want to know which address it jmb
the opcode is 1AFFFFF9 if there is who know how can i understand which
address go this brunch

Rate this post
 0 ▲ useful ▼ not useful
How about telling us which processor you are talking about? Also you
could most likely find a description of the opcodes of your processor on
the vendor website.

Rate this post
 0 ▲ useful ▼ not useful
thank you andreas for your reply
the processor is DSP TMX320AV7111GFN i think it contain arm7,isn't it?
and i want to ask you is all the arm processor has his description of
the opcodes??

Rate this post
 0 ▲ useful ▼ not useful
the processor is ARM7TDMI

Rate this post
 0 ▲ useful ▼ not useful
http://www.ece.wisc.edu/~morrow/ECE353/arm7tdmi_instruction_set_reference.pdf

1AFFFFF9 means

1 = Condition: not equal
A = Branch (Link = 0)
FFFFF9 = offset

Branch if not equal
PC := PC + (offset << 2);

This branch can initiate a jump in negative direction to an address that
is 7 instructions or 28 bytes ahead.

Rate this post
 0 ▲ useful ▼ not useful
thank you very much Peter
Can you give me an example to Understand more ,please

Rate this post
 0 ▲ useful ▼ not useful
what does you mean about negative direction

Rate this post
 0 ▲ useful ▼ not useful
The offset is given in two's complement to encode positive and negative
numbers
http://en.wikipedia.org/wiki/Two%27s_complement

This is because it is a relative jump that can jump forward and
backwards. So the offset is the number of instructions to jump (from the
current position of the program counter), which can be positive to jump
in forward direction or negative to jump in reverse direction.

An offset of FFFFF9 (which is -7 in two's complement) means, that a jump
from the current position to a position that is 7 instructions earlier
is performed.

Rate this post
 0 ▲ useful ▼ not useful
thank you very muck Peter

• $formula (LaTeX syntax)$