Bcc Instruction


This instruction will cause a branch in the program if certain flags are set. There are fifteen ways of checking the flags. Each of them has a symbol of two letters which will replace the "cc" in "Bcc".



BCC Branch Carry Clear - Branch if the C-flag is 0.
BCS Branch Carry Set - Branch if the C-flag is 1.
BEQ Branch EQual - Branch if the Z-flag is 1.
BNE Branch Not Equal - Branch if the Z-flag is 0.
BGE Branch Greater or Equal - Branch if N and V are equal.
BGT Branch Greater Than - Branch if N and V are equal and Z=0.
BHI Branch HIgher than - Branch if both C and Z are 0.
BLE Branch Less or Equal - Branch if Z=1 or if N and V are different.
BLS Branch Lower or Same - Branch if C=1 or Z=1.
BLT Branch Less Than - Branch if N and V are different.
BMI Branch MInus - Branch if N=1.
BPL Branch PLus - Branch if N=0.
BVC Branch V Clear - Branch if V=0
BVS Branch V Set - Branch if V=1.
BRA BRanch Always

Some conditions are pretty similar. BGE, BGT, BLE, BLT should be used when using signed integers and BHI and BLS when using unsigned integers.

ADDRESS METHODS: No special. You specify a label, which the compiler will change to a relative address, byte or word depending on how far you will jump.

DATA LENGTH: Short, Long

FLAGS: Unaffected

SYNTAX: Bcc.S <label>
Bcc.L <label>

You do not have to add .S or .L, the compiler will choose the best syntax.
EASy68K will accept .B or .S to force 1-byte offsets and .W or .L to force 2-byte offsets.