Renesas H8S/2138 Series Manual Pagina 21

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 148
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 20
Microcomputer Technical Q&A
13
Q&A No.: QAH8S-012
Category: Instruction
Subject: Support of DAA (DAS) Instruction Corresponding to INC (DEC)
Instruction
Questions
1. The DAA instruction is used for an add instruction (ADD instruction). What operation is
performed if a DAA instruction is executed after an INC instruction?
2. The DAS instruction is used for a subtract instruction (SUB instruction). What operation is
performed if a DAS instruction is executed after a DEC instruction?
Answers
1. Use of the DAA instruction after execution of an INC instruction is not supported. This is
because the operation result is indicated by the C and H flags after an INC instruction is
executed. To decrement decimal data, add –1 with an ADD instruction (ADD.B #–1, Rd), then
execute a DAA instruction.
2. Use of the DAS instruction after execution of a DEC instruction is not supported. This is
because the operation result is indicated by the C and H flags after a DEC instruction is
executed. To decrement decimal data, add 1 with an ADD instruction (ADD.B #1, Rd), then
invert the C and H flags (XORC #A0, CCR) and execute a DAS instruction.
Note: However, the actual operation is determined by the flag statuses.
Applicable Products
Applicability Series Applicability Series Applicability Series
Yes Entire H8S Series H8S/2655 H8S/2350
H8S/2355 H8S/2357 H8S/2345
H8S/2245 H8S/2148 H8S/2144
H8S/2138 H8S/2134 H8S/2128
H8S/2124
Vista de pagina 20
1 2 ... 16 17 18 19 20 21 22 23 24 25 26 ... 147 148

Comentarios a estos manuales

Sin comentarios