Re: Branch Instruction Summary

Sean Conner via Coco <coco-uNHYcr1XS/wmlAP/[email protected]>
Newsgroups gmane.comp.hardware.tandy.coco
Message-ID <[email protected]>
It was thus said that the Great Allen Huffman via Coco once stated:
> On Jul 22, 2025, at 1:16 PM, John Mark Mobley via Coco <[email protected]> wrote:
> > 
> > All,
> > 
> > See attached. I hope the attachment works.
> 
> I feel this would be very useful to me, with a bit more explaining. I have
> never really visualized how some of these other OP codes work with setting
> carry or Z or whatever. I know this is all embedded in the OP code
> references and such, and maybe I would understand it today, but I sure
> didn’t back in 1984.

  Here's the chart I found.  Plain text, and it (to me) explains when to use
what branches:

  +-----------------------------------------------------------------------+
  |                        6809 BRANCH INSTRUCTIONS                       |
  +-------------+-----------------------------+---------------------------+
  | Instruction |         Description         |     Condition Formula     |
  +-------------+-----------------------------+---------------------------+
  |   BCC/BHS   | Higher Or Same              |             XC            |
  |   BCS/BLO   | Lower                       |              C            |
  |     BHI     | Higher                      |            XC*XZ          |
  |     BLS     | Lower Or Same               |            C + Z          |
  |     BNE     | Not Equal                   |             XZ            |
  |     BEQ     | Equal                       |              Z            |
  |     BGE     | Greater Or Equal (Signed)   |          N*V + XN*XV      |
  |     BLT     | Less Than (Signed)          |         N*XV + XN*V       |
  |     BGT     | Greater Than (Signed)       |       N*V*XZ + XN*XV*XZ   |
  |     BLE     | Less Than Or Equal (Signed) |       Z + N*XV + XN*V     |
  |     BPL     | Plus (Positive)             |             XN            |
  |     BMI     | Minus (Negative)            |              N            |
  |     BVC     | Overflow Clear              |             XV            |
  |     BVS     | Overflow Set                |              V            |
  |     BRA     | Always                      |              1            |
  |     BRN     | Never                       |              0            |
  +-------------+-----------------------------+---------------------------+

  The top four branches are unsigned.  I don't even look at the condition
formula (but it was handy when writing my own emulator---here X means NOT).

  -spc

-- 
Coco mailing list
[email protected]
https://pairlist5.pair.net/mailman/listinfo/coco
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.