Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | 68HC12 | Accumulator A - INCA - C flag


Advertise Here

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

Accumulator A - INCA - C flag - stewartraymond - Mar 31 20:50:11 2009

The contents of Accumulator A are $FF, and the C flag is cleared. An INCA instruction is executed, the C flag will be ____________________.

1. set
2. cleared
3. cannot be determined
4. added to Accumulator A, so that it contains $01

------------------------------------



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )


Re: Accumulator A - INCA - C flag - Edward Karpicz - Apr 1 0:14:16 2009

On Prima Aprilis contents of flag C indeed depends on what will be in A
after INCA instruction. It does depend even more on what was in A before
INCA. Open CPU12 reference manual, Instruction Questionary, INCA, and you
will see triangle in corresponding to C flag CCR details box. Which, as
22.19 Condition Code Changes states, means that it's hard to predict C
value....

----- Original Message -----
From: "stewartraymond"
To: <6...@yahoogroups.com>
Sent: Wednesday, April 01, 2009 3:49 AM
Subject: [68HC12] Accumulator A - INCA - C flag
> The contents of Accumulator A are $FF, and the C flag is cleared. An INCA
> instruction is executed, the C flag will be ____________________.
>
> 1. set
> 2. cleared
> 3. cannot be determined
> 4. added to Accumulator A, so that it contains $01
>
> ------------------------------------



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

RE: Accumulator A - INCA - C flag - jpdi - Apr 1 3:39:14 2009

In "Core User Guide" (S12CPU15UG V1.2) about INCA instruction, only N, Z an=
d
V flags are affected, not C...
I read :=20
"The C bit is not affected by the operation, thus allowing the INC
instruction to be used as a loop counter in multiple precision computation"=
.

So, the answer is "5", an answer you didn't write, that means "unchanged".

In order to verify my answer, I wrote code and test this, and it's OK : C
remain unchanged.

Joel

-----Message d'origine-----
De=A0: 6...@yahoogroups.com [mailto:6...@yahoogroups.com] De la part de
Edward Karpicz
Envoy=E9=A0: mercredi 1 avril 2009 06:10
=C0=A0: 6...@yahoogroups.com
Objet=A0: Re: [68HC12] Accumulator A - INCA - C flag

On Prima Aprilis contents of flag C indeed depends on what will be in A=20
after INCA instruction. It does depend even more on what was in A before=20
INCA. Open CPU12 reference manual, Instruction Questionary, INCA, and you=20
will see triangle in corresponding to C flag CCR details box. Which, as=20
22.19 Condition Code Changes states, means that it's hard to predict C=20
value....

----- Original Message -----=20
From: "stewartraymond"
To: <6...@yahoogroups.com>
Sent: Wednesday, April 01, 2009 3:49 AM
Subject: [68HC12] Accumulator A - INCA - C flag
> The contents of Accumulator A are $FF, and the C flag is cleared. An INCA=
=20
> instruction is executed, the C flag will be ____________________.
>
> 1. set
> 2. cleared
> 3. cannot be determined
> 4. added to Accumulator A, so that it contains $01
>
> ------------------------------------



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )