one keil's c function allow how many lines and how big (code)? THKS!
"one keil's c function allow how many lines and how big (code)?" I doubt there is a specific limit. You could do some tests with copy and paste, but you are unlikely to learn anything useful from it. If you do manage to reach some limit of this nature your function is going to be unreasonably big.
Other than in the limited free Evaluation version, the tools themselves do not impose any specific limits. The limits are imposed by the underlying hardware; eg, how much ROM do you have?
From the C51 manual: -- Appendix D. Compiler Limits The Cx51 compiler embodies some known limitations that are listed below. For the most part, there are no limits with respect to components of the C language; for example, you may specify an unlimited number of symbols or number of case statements in a switch block. If there is enough address space, several thousand symbols could be defined. A maximum of 19 levels of indirection (access modifiers) to any standard data type are supported. This includes array descriptors, indirection operators, and function descriptors. Names may be up to 256 characters long. The C language provides for case sensitivity in regard to function and variable names. However, for compatibility reasons, all names in the object file appear in capital letters. It is therefore irrelevant if an external object name within the source program is written in capital or small letters. The maximum number of case statements in a switch block is not fixed. Limits are imposed only by the available memory size and the maximum size of individual functions. The maximum number of nested function calls in an invocation parameter list is 10. The maximum number of nested include files is 9. This value is independent of list files, preprocessor files, or whether or not an object file is to be generated. The maximum depth of directives for conditional compilation is 20. This is a preprocessor limitation. Instruction blocks ({…}) may be nested up to 15 levels deep. Macros may be nested up to 8 levels deep. A maximum of 32 parameters may be passed in a macro or function call. The maximum length of a line or a macro definition is 2000 characters. Even after a macro expansion, the result may not exceed 2000 characters. -- Maximum size of a function is not specifically addresses, other than the blanket statement "for the most part" at the beginning. I've never run into a limitation on function size in practice. What I'd guess is my longest function is 351 lines of C -- a switch statement, so it's not especially dense. The quest for smaller 8051 code tends to lead me to smaller and smaller functions, rather than larger ones. You might be able to find a bug at some architecturally significant number -- say, 2K of object code so that ACALLs can no longer reach inside the function. I wouldn't be at all surprised if the toolchain fails on functions larger than 64KB, or even 32KB when banking is enabled. The evalation version has some artificial limitations imposed on maximum project size (4KB, as I recall).