BZ BNZ CZ CNZ

BTCAD

Active Member
Sorry for this noob question, but what is the difference for those opcode? BZ BNZ CZ CNZ


I can'T understand when i need to use it.



thx
 
BZ  -- branch when zero bit is set
BNZ -- branch when zero bit is NOT set
CZ -- call sub when zero bit is set
CNZ -- call sub when zero bit is NOT set
 
In the user guide, there are some examples, please check out the programming section.
To properly use those four commands, you need to understand zerobit, which is being updated by all the operations, for example, 1-1 = 0. that will set zerobit to true. 
 
Back
Top