Maxim-integrated MAXQ622 Manual do Utilizador Página 47

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 255
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 46
MAXQ612/MAXQ622 Users Guide
Maxim Integrated 3-11
3.6.2 Zero Flag
The zero flag (PSF.7) is a dynamic flag that reflects the current state of the active accumulator Acc. If all bits in the
active accumulator are zero, the zero flag equals 1. Otherwise, it equals 0.
Because the zero flag is a dynamic reflection of (Acc = 0), any instruction that changes the value in the active accu-
mulator can potentially change the value of the zero flag. Any instruction that changes which accumulator is the active
one (including AP autoincrement/decrement) can also change the zero flag.
The following operations use the zero flag:
JUMP Z, src (jump if zero flag is set)
JUMP NZ, src (jump if zero flag is cleared)
3.6.3 Equals Flag
The equals flag (PSF.0) is a static flag set by the CMP instruction. When the source given to the CMP instruction is
equal to the active accumulator, the equals flag is set to 1. When the source is different from the active accumulator,
the equals flag is cleared to 0.
The following instructions use the value of the equals flag. Note that the ‘src’ for the JUMP E/NE instructions must be
immediate.
JUMP E, src (jump if equals flag is set)
JUMP NE, src (jump if equals flag is cleared)
In addition to the CMP instruction, any instruction using PSF as the destination can alter the equals flag.
3.6.4 Carry Flag
The carry flag (PSF.1) is a static flag indicating that a carry or borrow bit resulted from the last ADD/ADDC or SUB/
SUBB operation. Unlike the other status flags, it can be set or cleared explicitly, and is also used as a generic bit
operand by many other instructions.
The following instructions can alter the carry flag:
ADD src (Add source to active accumulator)
ADDC src (Add source and carry to active accumulator)
SUB src (Subtract source from active accumulator)
SUBB src (Subtract source and carry from active accumulator)
SLA, SLA2, SLA4 (Arithmetic shift left active accumulator)
SRA, SRA2, SRA4 (Arithmetic shift right active accumulator)
SR (Shift active accumulator right)
RLC/RRC (Rotate active accumulator left/right through carry)
MOVE C, Acc.<b> (Set Carry to selected active accumulator bit)
MOVE C, #i (Explicitly set, i = 1, or clear, i = 0, the carry flag)
CPL C (Complement carry)
MOVE C, src.<b> (Copy bit addressable register bit to carry)
any instruction using PSF as the destination
The following instructions use the value of the carry flag:
ADDC src (Add source and carry to active accumulator)
SUBB src (Subtract source and carry from active accumulator)
RLC/RRC (Rotate active accumulator left/right through carry)
CPL C (Complement carry)
Vista de página 46
1 2 ... 42 43 44 45 46 47 48 49 50 51 52 ... 254 255

Comentários a estes Manuais

Sem comentários