PDATA stack reentrant calling convention

Technical Note 63666



3/15/2011 10:14 AM


This Technical Note applies to IAR Embedded Workbench for 8051 version 7.60.


Here are some hints to help you configure the PDATA stack reentrant calling convention. You need to modify the .xcl linker configuration file if you want to use this calling convention.

First of all make sure that you place the PDATA stack before other XDATA memory objects. The .xcl file is read and processed top-down by the linker.



This will use "page 0" with the address range 0x0001-0x00FF in the XDATA memory. You need to avoid address zero.


This will use "page 1" with the address range 0x0100-0x01FF in the XDATA memory.


This will use "page 2" with the address range 0x0200-0x02FF in the XDATA memory.

Another thing worth doublechecking is the menu:
Project > Options > General Options > Data Pointer > Page register address
where the top byte is stored for the PDATA stack page.
You do not want other data to overwrite this location.


All product names are trademarks or registered trademarks of their respective owners.

Related Tech Notes

© IAR Systems 1995-2016 - All rights reserved.