Syntax: Operands: Program Counter:
(i) BRBC s,k 0 s 7, -64 k +63 PC PC + k + 1
PC PC + 1, if condition is false
16-bit Opcode:
Status Register (SREG) and Boolean Formulae:
I T H S V N Z C
Exemplu:
cpi r20,5 ; Compare r20 to the value 5
brbc 1,noteq ; Branch if zero flag cleared
...
noteq:nop ; Branch destination (do nothing)
BREQ - Branch if Equal
Descriere:
Salt condiţionat relativ. Testează “Zero flag” (indicatorul Z) ; daca acesta e “1 logic” PC creşte cu k+1 altfel creşte normal cu 1. Indicatorul Z este 1 dacă Rd=Rr , în registre fiind numere cu sau fară semn. Saltul se face cu +k sau –k. Parametru k este un deplasament faţă de valoarea din PC şi este reprezentat în complement faţă de 2.
Operation:
-
If Rd = Rr (Z = 1) then PC PC + k + 1, else PC PC + 1
Dostları ilə paylaş: |