Hello, I would like to know how the keil compiler locate the arguments of a function. 1) it pass it via the stack? 2) it declares a places in the memory space, and in this case how he choose the memory space that it will use? Thank You Kaoru
Read the Manual - particularly the section about interfacing to assembler, and the description of the Memory Model. It's all there.
I have red the manual. I am in the large model, so i have to have all my arguments in the external memory. But there is something that i do not understand. This is correct for lots of function that i declared. But i have noticed that if we used the variable immediately (see the declaration below), keil will put the local variable in the data segment and not in the xdata. void function (unsigned char output_char) { SMB0DAT = output_char; /**** + other code ****/ } Why it does not put the variable output_char in the LARGE model?
Is it just using Registers?
no, it places the variable in the data segment.
View all questions in Keil forum