Politehica din Bucuresti proiect de diplomă Facultatea transporturi


BRBS - Branch if Bit in SREG is Set



Yüklə 1,46 Mb.
səhifə94/104
tarix09.01.2022
ölçüsü1,46 Mb.
#91958
1   ...   90   91   92   93   94   95   96   97   ...   104
BRBS - Branch if Bit in SREG is Set
Descriere:

Salt condiţionat relativ. Testează un bit în SREG ; dacă bitul e 1 PC creşte cu k+1 altfel creşte normal cu 1. Saltul se face cu +k sau –k. Parametrul k este un deplasament faţă de valoarea din PC şi este reprezentat în complement faţă de 2.


Operation:

(i) If SREG(s) = 1 then PC  PC + k + 1, else PC  PC + 1


Syntax: Operands: Program Counter:

(i) BRBS s,k 0  s  7, -64  k  +63 PC  PC + k + 1

PC  PC + 1, if condition is false



16-bit Opcode:


1111

00kk

kkkk

ksss

Status Register (SREG) and Boolean Formulae:


I T H S V N Z C

-

-

-

-

-

-

-

-


Exemplu:

bst r0,3 ; Load T bit with bit 3 of r0

brbs 6,bitset ; Branch T bit was set

bitset: nop ; Branch destination (do nothing)



BRBC - Branch if Bit in SREG is Cleared
Descriere:

Salt condiţionat relativ. Testează un bit în SREG ; dacă bitul e zero PC creşte cu k+1 altfel creşte normal cu 1. Saltul se face cu +k sau –k. Parametrul k este un deplasament faţă de valoarea din PC şi este reprezentat în complement faţa de 2.



Operation:

(i) If SREG(s) = 0 then PC  PC + k + 1, else PC  PC + 1



Yüklə 1,46 Mb.

Dostları ilə paylaş:
1   ...   90   91   92   93   94   95   96   97   ...   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