When the -s option for the linker is used, the stack symbols _@STEND and _@STBEG are output, but these cannot be used in C source code. Reference to the stack addresses is only possible in assembly source code; create assembly functions like that shown below and call them by reference from the C source code.
(Example of definition of the assembly function (to _@STEND)) PUBLIC _stkadr EXTRN _@STEND CSEG stkadr: MOVW BC, #LOWW _@STEND MOVW DE, #HIGHW _@STEND END (Example of reference in the C source code (to _@STEND)) __far unsigned char * stkadr(void); __far unsigned char *endadr; endadr = stkadr();
|C Compiler Package for RL78 and 78K Families|
|Compiler for RL78 Family and 78K0R [CA78K0R]|
|Compiler for 78K0R [CC78K0R]|