| ??? 01/09/04 21:18 Read: times |
#62273 - DO *NOT* DO THIS! Responding to: ???'s previous message |
Is there any method to get the carry while rotating a byte. Although C51 does give you access to the carry flag (CY), you can not rely upon it containing the "carry" value from the preceding 'C' statement. http://www.keil.com/discuss/docs/thread3811.htm Keil C51 provides Intrinsic Functions for doing rotates - see the Manual See also: http://www.keil.com/discuss/docs/thread1252.htm And also if I want to include the same assembly code in between C statements how can I go through. Again, although you can do this, it is generally a bad idea. There is no difficulty in calling 'C' functions from assembler, and vices-versa - in fact, there is a whole section in the Manual titled "Interfacing 'C' and Assembler!" So, if you have code that really needs to be done in assembler, do it in assembler! - don't try to bodge it into your 'C'! Is there any Pragma statement for inclusion of assembly? Another one for the Manual Hint: SRC - and be sure to read the whole description of it! |
| Topic | Author | Date |
| RLC using C | 01/01/70 00:00 | |
| RE: RLC using C | 01/01/70 00:00 | |
| DO *NOT* DO THIS! | 01/01/70 00:00 | |
RE: RLC using C | 01/01/70 00:00 |



