Texas Instruments MSP430x1xx Manuale Utente Pagina 81

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 432
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 80
Instruction Set
3-45
RISC 16−Bit CPU
JEQ, JZ Jump if equal, jump if zero
Syntax JEQ label, JZ label
Operation If Z = 1: PC + 2 × offset −> PC
If Z = 0: execute following instruction
Description The status register zero bit (Z) is tested. If it is set, the 10-bit signed offset
contained in the instruction LSBs is added to the program counter. If Z is not
set, the instruction following the jump is executed.
Status Bits Status bits are not affected.
Example Jump to address TONI if R7 contains zero.
TST R7 ; Test R7
JZ TONI ; if zero: JUMP
Example Jump to address LEO if R6 is equal to the table contents.
CMP R6,Table(R5) ; Compare content of R6 with content of
; MEM (table address + content of R5)
JEQ LEO ; Jump if both data are equal
...... ; No, data are not equal, continue here
Example Branch to LABEL if R5 is 0.
TST R5
JZ LABEL
......
Vedere la pagina 80
1 2 ... 76 77 78 79 80 81 82 83 84 85 86 ... 431 432

Commenti su questo manuale

Nessun commento