We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I want to generate very efficient code using the carry-bit from C-code, and the instructions JNC or JC.
... sbit PinBit= P0^0; //port-IO bit ... CY=PinBit; //generates MOV C,PinBit ... if(CY) { //do something } IfNotCY: ...
The if(CY) instructiuons generates JNB CY,IfNotCY
How can i get it to use the more efficient JNC IfNotCY?
Analogously, if(!CY) should generate JC {label}.
"This is an extremely time critical function, where i have to scrutinize every clock cycle used."
Then I'd simply write it in assembly, perhaps first having created the module framework by compiling some C to assembly source using the SRC directive.