Politehica din Bucuresti proiect de diplomă Facultatea transporturi


Syntax: Operands: Program Counter



Yüklə 1,46 Mb.
səhifə95/104
tarix09.01.2022
ölçüsü1,46 Mb.
#91958
1   ...   91   92   93   94   95   96   97   98   ...   104
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:


1111

01kk

kkkk

ksss

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:

  1. If Rd = Rr (Z = 1) then PC  PC + k + 1, else PC  PC + 1



Yüklə 1,46 Mb.

Dostları ilə paylaş:
1   ...   91   92   93   94   95   96   97   98   ...   104




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©muhaz.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin