|
|||||||||||
Technical Support Support Resources
Product Information |
C51: Register VariablesInformation in this article applies to:
SYMPTOMSI'm trying to use the register keyword to declare variables I want to be stored in registers. However, the C51 C compiler seems to ignore this. CAUSEThis is by design. The 8051 only has 8 general purpose registers. Each of them is a single byte register. So, declaring 2 unsigned long register variables would consume all of the available registers if this feature were supported. RESOLUTIONThere is no way to declare register variables with the C51 Compiler. If you must use registers, you should consider writing an assembly routine for the function that requires register variables. SEE ALSOLast Reviewed: Thursday, February 25, 2021 | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.