Texas Instruments MSP430x1xx Manual do Utilizador Página 81

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 432
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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
......
Vista de página 80
1 2 ... 76 77 78 79 80 81 82 83 84 85 86 ... 431 432

Comentários a estes Manuais

Sem comentários