'BRANCH' COMMAND

benbaker7

Active member
Hi Guys... In attempting to come to grips with the BRANCH function (Pt 2, P42), I'm having problems with the example listed.

1. It appears to me that as b1 is initially set to 0 in 'reset1' and is incremented in 'main', then b.0 can never go high, as on the first pass, b1 will inc to 1, allowing b.1 to go high. Therefore b1 needs to be 'let b1=0 - 1' as the first line in 'reset1' [actually 255]
.
2. Whilst b.4 will go high on the first pass, it will never go low unless there is a 'low b.4' at the end of 'reset1'.

So unless the designer of the example had something else in mind such as simply demonstrating the relativity of offset to address, I'm a little confused as to the listing as presented, ( and the same goes for '0n...Goto' (p 148)) bearing in mind that the example is simply a snippet.

I'd appreciate a comment from someone who has played with the example. (I did set this up on the simulator with a simulated 14M2 to test my reasoning).

Ben Baker.
 

Aries

New Member
You are right that B.0 can never go high, but that might be deliberate - to make the point that the count in "branch" goes from zero, not 1.
 
Top