Carry Bit

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Carry Bit

4,320 次查看
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

标签 (1)
0 项奖励
回复
3 回复数

1,086 次查看
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 项奖励
回复

1,086 次查看
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 项奖励
回复

1,086 次查看
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 项奖励
回复