Hi when my code reaches a certain size, the sprintf function doesn't work correct anymore. The .h86 file has now a size of 164KB, guess code is around 64KB (last code block in map file). The module has 1MB SRAM and 1MB Flash, so there should be no problem. Memory model is HLarge, segmented. sprintf just removes all '%' from the formatting string but does no replacements. Does anyone know this symptoms? I guess it's a segmentation problem. Any solutions or hints? Thanks
"The total number of bytes that may be passed to sprintf is limited due to the memory restrictions imposed by the 8051." True, but the toolset is stated as C166 - not C51! Does C166 have the same limitation?
Does C166 have the same limitation? No, it doesn't. The first few arguments are passed to the function in registers, the rest - on the user stack. User stack can be as large as 16KB, or even 64KB - I'm not sure. - mike