Carry Bit

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Carry Bit

3,672 Views
ernestsnaith
Contributor I
Where is the carry bit and how do you access it in C? Why is is not mentioned in datasheet?
 
MC9s12xdt512
 

Message Edited by ernestsnaith on 05-17-200612:33 PM

Labels (1)
0 Kudos
3 Replies

438 Views
ernestsnaith
Contributor I

The datasheet i am looking at is the MC9S12XDP512 one. I have searched the entire document for carry bit and only found it in XGATE.

I thought the XGATE was the co-processor that dealt with interrupts etc so iv left it for now.

Cheers

Message Edited by ernestsnaith on 05-18-200601:10 AM

0 Kudos

438 Views
Sten
Contributor IV
The 9S12XDP512 datasheet contain all the information about everything in the controller, except for the S12X core. Take a look at the S12XCPUV1 manual (http://www.freescale.com/files/microcontrollers/doc/ref_manual/S12XCPUV1.pdfhttp://www.freescale.com/files/microcontrollers/doc/ref_manual/S12CPUV2.pdf?srch=1" rel="nofollow" t...) and you will find all the info you need about the Carry-bit.

Message Edited by Sten on 05-18-200601:07 PM

0 Kudos

438 Views
imajeff
Contributor III
Interresting question.

C standard does not define access of a "carry bit", however when you write in C, the compiler will use the CPU's carry bit as needed if the target has one.

If you want to specifically use hardware directly such as a CPU carry bit, you must use assembly (i.e. inline asm).

As far as data sheets, the MCU data sheets do explain the carry bit, as they should. I wonder what data sheet you are referring to, but you don't have to answer.
0 Kudos