Keil Logo

C51: Performing a Software Reset


Information in this article applies to:

  • C51

QUESTION

How can I force the C compiler to generate a jump to 0000H in order to perform a software reset?

ANSWER

The following line of code will do the trick:

((void (code *)(void)) 0) ();

This generates:

LCALL   0000h

SEE ALSO


Last Reviewed: Thursday, February 25, 2021


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

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.