Renesas H8S/2138 Series Manual Página 10

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 148
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 9
Microcomputer Technical Q&A
2
Q&A No.: QAH8S-002
Category: CPU
Subject: Difference between V Flag and C Flag in CCR
Question
The V flag and C flag in CCR are both set if overflow occurs during an operation. What is the
difference between these flags?
Answer
The V flag in CCR is used to identify whether overflow occurs in a signed operation. To take the
example of a byte-size operation, this flag is set to 1 if the operation result is smaller than the
negative minimum value (H'80) larger than the positive maximum value (H'7F).
V flag
H'80
H'7FH'00
Overflow Overflow
The C flag, on the other hand, is used to identify whether overflow occurs in an unsigned
operation. To take the example of a byte-size operation, this flag is set to 1 if the operation result
is larger than the maximum value (H'FF) or smaller than the minimum value (H'00).
C flag
H'00
H'FF
Overflow Overflow
Vista de página 9
1 2 ... 5 6 7 8 9 10 11 12 13 14 15 ... 147 148

Comentários a estes Manuais

Sem comentários