Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).
68HC11 Microcontroller - stewartraymond - Mar 25 23:24:30 2009
Question:
Accumulator A contains $FF, and the C flag is cleared. If a DECA instruction is executed,
the Z flag will be ____________________.
------------------------------------

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
Re: 68HC11 Microcontroller - zolt...@bendor.com.au - Mar 25 23:31:58 2009
On Thu, 26 Mar 2009, stewartraymond wrote:
> Question:
>
> Accumulator A contains $FF, and the C flag is cleared. If a DECA
> instruction is executed, the Z flag will be ____________________.
Cleared. DECA subtracts 1 from accumulator A and sets the Z flag if the
result is 0, clears it otherwise. ff - 1 is fe, a non-zero value
therefore the Z flag will be cleared. The value of the C flag before the
instruction is irrelevant and the instruction will not change it.
Zoltan
------------------------------------

(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )
Re: 68HC11 Microcontroller - "John Hartman (NoICE)" - Mar 26 21:35:10 2009
At 10:24 PM 3/25/09, you wrote:
>Question:
>Accumulator A contains $FF, and the C flag is cleared. If a DECA
>instruction is executed, the Z flag will be ____________________.
Worth 5 points on your mid-term exam?
You might consider looking in the processor databook. You will need
to do so many times in your engineering career.
You might consider using a debugger and single-stepping a DECA to see
what happens. You will need to do so many times in your engineering
career. Especially when it turns out that the databook is wrong...
[Non-text portions of this message have been removed]
------------------------------------
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )