Keil™, An ARM® Company

Technical Support

C51: ?C? LONG/FLOAT MATH LIBRARY ROUTINES


Information in this article applies to:

  • C51 Version 6.x

NOTE

The Keil C51 library includes a number of helper routines for the C51 compiler. These routines perform mundane tasks that are best not included in-line.

These routines are named using the following convention: ?C?ttfff

where:

  • tt is the type field,
  • and fff is the operation field.

TYPE FIELD

The type field may be one of the follwoing:

  • L indicates 2 longs passed in R0/R1/R2/R3 and R4/R5/R6/R7.
  • FP indicates 2 floating-pointer numbers (float) passed in R0/R1/R2/R3 and R4/R5/R6/R7.

OPERATION FIELD

The operation field indicates the math operation to perform:

  • ADD indicates addition.
  • SUB indicates subtraction.
  • MUL indicates multiplication.
  • DIV indicates division.
  • CMP indicates comparison.
  • AND indicates bitwise and.
  • OR indicates bitwise or.
  • XOR indicates bitwise exclusive or.

The results of the operation are returned in R4/R5/R6/R7.

MORE INFORMATION

SEE ALSO

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Friday, July 15, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure