This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

89c66x 128b DATA and parameters

Hello everybody,

I've a question concerning the internal RAM of derivatives such p89c66x and passing parameters.

As far I've understood, the internal RAM has 256 bytes in 89c66x. the 128 first bytes are for stack, registers, bit registers and the functions parameters, the remaining 128 bytes are general purpose RAM.

When passing parameters in a function, the parameters space is allocated in the first 128 bytes. Each parameter of a coded function has its space allocated here.

When the application has many functions, the available space decrease dangerously !
Currently, I've only 30 bytes remaining in this segment and I've just coded the low-level and general purpose functions. This means I've still to code the application.
I'll surely have a lack of space in this segment....

Is there a way to put the space allocation of these parameters in XDATA or to tell the linker to allocate memory only when the function is called ?

Note that reducing the number of functions isn't a solution for me. My application needs really many functions in order to be well coded.

Thanks
Best regards
Stephane