Keil Logo


Information in this article applies to:

  • C51 Version 5.50


I am stepping through the startup code from startup.a51 in dScope and my program seems to get stuck in the IDATALOOP. However, if I type g,main to go straight to main, it seems to work fine.


The IDATALOOP initializes the idata memory to 0. In order to do this, it has to go to each memory location in turn and store a zero. At the start of your startup.a51 file, you will have something like the following:

IDATALEN EQU 80H ; the length of IDATA memory in bytes.

This sets the size of idata. Therefore the IDATALOOP has to loop 80H times. If you step into the loop repeatedly, you will see in the Register window R0 counting down from 80H to 0H, as it is used to store the current memory location.


Last Reviewed: Friday, July 15, 2005

Did this article provide the answer you needed?
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.