Accumulator A - INCA - C flag

View: New views
3 Messages — Rating Filter:   Alert me  

Accumulator A - INCA - C flag

by stewartraymond :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


Re: Accumulator A - INCA - C flag

by Edward Karpicz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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" <stewartraymond@...>
To: <68HC12@...>
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
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>


RE: Accumulator A - INCA - C flag

by jpdi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In "Core User Guide" (S12CPU15UG V1.2) about INCA instruction, only N, Z and
V flags are affected, not C...
I read :
"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 : 68HC12@... [mailto:68HC12@...] De la part de
Edward Karpicz
Envoyé : mercredi 1 avril 2009 06:10
À : 68HC12@...
Objet : Re: [68HC12] Accumulator A - INCA - C flag

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" <stewartraymond@...>
To: <68HC12@...>
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
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>



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

Yahoo! Groups Links