Meindert Sprang
Guest
|
Posted:
Wed Dec 14, 2005 4:47 pm Post subject:
Re: 8051 jbc instruction help |
|
|
"PagCal" <pagcal@runbox.com> wrote in message
news:glSnf.77$Vr.73@fe06.lga...
| Quote: |
jump if bit set and clear (jbc) has 3 bytes:
0x10 - the instruction
0xbit - the bit number
0xoff - the relative pc offset to take if bit set
the question is, which pc is the 'off' relative to?
In other words, if my program has:
pc code
-------------
5 0x10
6 bit
7 off
is the 'off' relative to pc = 7 or pc = 8 or some other pc?
|
Well, the datasheet says: "The range of the jump is therefore -128 to +127
Program Memory bytes relative to the first byte following the instruction."
So, it is relative to pc = 8.
Meindert |
|