[PD-dev] [once] default closed...

Mathieu Bouchard matju at artengine.ca
Fri Sep 29 08:00:14 CEST 2006


On Fri, 29 Sep 2006, Chris McCormick wrote:
> On Fri, Sep 29, 2006 at 12:28:57AM -0400, Mathieu Bouchard wrote:
>> BRA, or branch always, means if(1) goto ...;
>> BRN, or branch never,  means if(0) goto ...;
>> Note that 6809 already has another goto statement, called JMP.
> Weird. Does the BRN have the same side effects, number of cycles etc. as
> a NOP? Likewise for BRA vs JMP?

The main reason for BRA and LBRA is that if you want position-independent 
code, you need relative jumps, but JMP was absolute-only. Also, BRA was 
2 bytes, while both LBRA and JMP were 3 bytes. (L stood for "Long", and a 
16-bit offset was kind of long back then)

BRN was really completely useless, but that's because the 16 branch 
opcodes had a "not" bit, so for example "branch if less than" and "branch 
if greater or equal" were the same opcode except for that bit; and thus 
BRN existed only because it was the complement of BRA.

That's only what I figured out; a real 6809 assembly coder could tell you 
more.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada


More information about the Pd-dev mailing list