Texas-instruments MSP430x1xx Manual de usuario Pagina 384

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 440
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 383
Instruction Set Overview
B-34
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 pagina 383
1 2 ... 379 380 381 382 383 384 385 386 387 388 389 ... 439 440

Comentarios a estos manuales

Sin comentarios