EmbDev.net

Forum: µC & Digital Electronics help about opcode


Author: sa (Guest)
Posted on:

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

: Moved by Admin
Author: Andreas Schwarz (andreas) (Admin) Flattr this
Posted on:

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.

Author: sa (Guest)
Posted on:

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??

Author: sa (Guest)
Posted on:

Rate this post
0 useful
not useful
the processor is ARM7TDMI

Author: Peter Diener (pdiener)
Posted on:

Rate this post
0 useful
not useful
http://www.ece.wisc.edu/~morrow/ECE353/arm7tdmi_in...

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.

Author: SA (Guest)
Posted on:

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

Author: SA (Guest)
Posted on:

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

Author: Peter Diener (pdiener)
Posted on:

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.

Author: SA (Guest)
Posted on:

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

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.