One additional note:
When a C language project is created and a startup file "STARTUP.A51" is added to the project, there is a macro
definition named "IDATALEN", which is a macro used to define the size of the IDATA. The default value is 128, which
is 80H in hexadecimal, and it is also the size of IDATA in the startup file that needs to be initialized to 0. Therefor if
IDATA is defined as 80H, the code in STARTUP.A51 will initialize the RAM of 00-7F of IDATA to 0. Similarly, if
IDATA is defined as 0FFH, the RAM of 00-FF of IDATA will be initialized to 0.
The IDATA size of the STC8 series of microcontrollers is 256 bytes (DATA of 00-7F and IDATA of 80H-FFH). Because
the last 17 bytes of RAM have the ID number and related test parameters, if you need to use this part of the data in the
program, you must not define IDATALEN as 256.
3. Project settings, select STC simulation driver.