Error C 212 Keil
30 Days In the Last 90 Days In the Last 6 Months Technical Support Overview Search Contact Assistance Request Feedback On-Line Manuals Product Manuals Document Conventions Cx51 User's Guide Cx51 Introduction Compiling Programs Language Extensions Preprocessor Advanced Programming 8051 Derivatives Error Messages Fatal Errors Actions Messages Errors and Warnings Reference Error C100 Error C101 Error C102 Error C103 Error C125 Error C126 Error C127 Error C129 Error C130 Error C131 Error C132 Error C134 Error C135 Error C136 Error C138 Error C140 Error C141 Error C142 Error C143 Error C144 Error C145 Error C146 Error C147 Error C149 Error C150 Error C151 Error C152 Error C153 Error C154 Error C155 Error C156 Error C157 Error C158 Error C159 Error C160 Error C161 Error C162 Error C163 Error C164 Error C165 Error C166 Error C167 Error C168 Error C169 Error C170 Error C171 Error C172 Warning C173 Error C174 Error C175 Error C176 Error C177 Error C178 Error C179 Error C180 Error C181 Warning C182 Error C183 Error C184 Error/Warning C185 Error C186 Error C187 Error C188 Error C189 Error C190 Error C193 Error C194 Error C195 Error C196 Error/Warning C198 Error C199 Error C200 Error C201 Error C202 Error C203 Error C204 Error C205 Warning C206 Error C207 Error C208 Error/Warning C209 Error C210 Error C211 Error C212 Error C213 Error/Warning C214 Error C215 Error C216 Error C217 Error C218 Error/Warning C219 Error C220 Error C221 Error C222 Error C223 Error C225 Error C226 Error C227 Error C228 Error C229 Error C230 Error C231 Error C232 Error C233 Error C234 Error C235 Error C236 Error C237 Error C238 Error C239 Error C240 Error C241 Error C242 Error C243 Error C244 Error/Warning C245 Error C246 Error C247 Error C248 Error C249 Error C250 Error C251 Error C252 Error C253 Error C255 Error C256 Error C257 Error/Warning C258 Error/Warning C259 Error/Warning C260 Error/Warning C261 Error C262 Error C263 Error C264 Error/Warning C265 Error C267 Error C268 Error/Warning C271 Error C272 Error C273 Error C274 Warning C275 Warning C276 Warning C277 Error C278 Error C279 Error/Warning C280 Error C281 Error C282 Error C283 Error C284 Warning C285 Warning C286 Warning C287 Warning C289 Warning C290 Warning C291 Warning C292 Error C293 Warning C294 Error C300
30 Days In the Last 90 Days In the Last 6 Months Technical Support Overview Search Contact Assistance Request Feedback Support Resources Support Knowledgebase Article Index Top 10 Articles Product Manuals Application Notes Downloads Product Updates Discussion Forum Books Product Information Software & Hardware Products ARM Development ToolsC166 Development ToolsC51 Development ToolsC251 Development ToolsDebug AdaptersEvaluation Boards Product Brochures Newsletters Home/Technical Support C51: PASSING PARAMETERS TO INDIRECTLY CALLED FUNCTIONS Information in this article http://www.keil.com/support/man/docs/c51/c51_c212.htm applies to: C51 All Versions Cx51 All Versions SYMPTOMS I'm using function pointers and object-oriented programming techniques in my application. Most of the time my program works as expected. But when I try to pass several parameters to functions that are called via pointers, I get the following compiler error message: Error 212: Indirect call: Parameters http://www.keil.com/support/docs/2066.htm do not fit within registers. The program example below demonstrates this: void (*CallBack1) (void *, unsigned char); void (*CallBack2) (void *, void *); void (*CallBack3) (char, char, char); void (*CallBack4) (char, char, char, char); unsigned char c, d, e, f; char *ptr; void test (void) { CallBack1 (ptr, c); // works CallBack2 (ptr, ptr); // fails - C51 generates an error message // indirect call: parameters do not fit within registers */ CallBack3 (c, d, e); // works CallBack4 (c, d, e, f); // fails - C51 generates an error message // indirect call: parameters do not fit within registers */ } CAUSE Unlike most 16-bit and 32-bit microcontrollers, the 8051 is not a stack based architecture. When parameters do not fit into the CPU registers, the Keil Cx51 Compiler by default uses direct memory locations for parameter passing. This technique generates very efficient code but limits the parameters that can be passed to indirectly called functions. When parameters passed to a function via a func
30 Days In the Last 90 Days In the Last 6 Months Technical Support Overview Search Contact Assistance Request Feedback On-Line Manuals Product Manuals Document Conventions Cx51 User's Guide Cx51 Introduction Compiling http://www.keil.com/support/man/docs/c51/c51_c211.htm Programs Language Extensions Preprocessor Advanced Programming 8051 Derivatives Error Messages Fatal Errors Actions Messages Errors http://www.keil.com/support/man/docs/c51/c51_c129.htm and Warnings Reference Error C100 Error C101 Error C102 Error C103 Error C125 Error C126 Error C127 Error C129 Error C130 Error C131 Error C132 Error C134 Error C135 Error C136 Error C138 Error C140 Error C141 Error C142 Error C143 Error C144 Error C145 Error C146 Error C147 Error C149 Error C150 Error C151 Error C152 Error error c C153 Error C154 Error C155 Error C156 Error C157 Error C158 Error C159 Error C160 Error C161 Error C162 Error C163 Error C164 Error C165 Error C166 Error C167 Error C168 Error C169 Error C170 Error C171 Error C172 Warning C173 Error C174 Error C175 Error C176 Error C177 Error C178 Error C179 Error C180 Error C181 Warning C182 Error C183 Error C184 Error/Warning C185 Error C186 Error C187 Error C188 Error error c 212 C189 Error C190 Error C193 Error C194 Error C195 Error C196 Error/Warning C198 Error C199 Error C200 Error C201 Error C202 Error C203 Error C204 Error C205 Warning C206 Error C207 Error C208 Error/Warning C209 Error C210 Error C211 Error C212 Error C213 Error/Warning C214 Error C215 Error C216 Error C217 Error C218 Error/Warning C219 Error C220 Error C221 Error C222 Error C223 Error C225 Error C226 Error C227 Error C228 Error C229 Error C230 Error C231 Error C232 Error C233 Error C234 Error C235 Error C236 Error C237 Error C238 Error C239 Error C240 Error C241 Error C242 Error C243 Error C244 Error/Warning C245 Error C246 Error C247 Error C248 Error C249 Error C250 Error C251 Error C252 Error C253 Error C255 Error C256 Error C257 Error/Warning C258 Error/Warning C259 Error/Warning C260 Error/Warning C261 Error C262 Error C263 Error C264 Error/Warning C265 Error C267 Error C268 Error/Warning C271 Error C272 Error C273 Error C274 Warning C275 Warning C276 Warning C277 Error C278 Error C279 Error/Warning C280 Error C281 Error C282 Error C283 Error C284 Warning C285 Warning C286 Warning C287 Warning C289 Warning C290 Warning C291 Warning C292 Error C293 Warning C294 Error C300 Error C301 Error C302 Error C303 Error C304 Error C305 Error C306 Error/Warning C307 Error C308 Error C309 Error C310 Err
30 Days In the Last 90 Days In the Last 6 Months Technical Support Overview Search Contact Assistance Request Feedback On-Line Manuals Product Manuals Document Conventions Cx51 User's Guide Cx51 Introduction Compiling Programs Language Extensions Preprocessor Advanced Programming 8051 Derivatives Error Messages Fatal Errors Actions Messages Errors and Warnings Reference Error C100 Error C101 Error C102 Error C103 Error C125 Error C126 Error C127 Error C129 Error C130 Error C131 Error C132 Error C134 Error C135 Error C136 Error C138 Error C140 Error C141 Error C142 Error C143 Error C144 Error C145 Error C146 Error C147 Error C149 Error C150 Error C151 Error C152 Error C153 Error C154 Error C155 Error C156 Error C157 Error C158 Error C159 Error C160 Error C161 Error C162 Error C163 Error C164 Error C165 Error C166 Error C167 Error C168 Error C169 Error C170 Error C171 Error C172 Warning C173 Error C174 Error C175 Error C176 Error C177 Error C178 Error C179 Error C180 Error C181 Warning C182 Error C183 Error C184 Error/Warning C185 Error C186 Error C187 Error C188 Error C189 Error C190 Error C193 Error C194 Error C195 Error C196 Error/Warning C198 Error C199 Error C200 Error C201 Error C202 Error C203 Error C204 Error C205 Warning C206 Error C207 Error C208 Error/Warning C209 Error C210 Error C211 Error C212 Error C213 Error/Warning C214 Error C215 Error C216 Error C217 Error C218 Error/Warning C219 Error C220 Error C221 Error C222 Error C223 Error C225 Error C226 Error C227 Error C228 Error C229 Error C230 Error C231 Error C232 Error C233 Error C234 Error C235 Error C236 Error C237 Error C238 Error C239 Error C240 Error C241 Error C242 Error C243 Error C244 Error/Warning C245 Error C246 Error C247 Error C248 Error C249 Error C250 Error C251 Error C252 Error C253 Error C255 Error C256 Error C257 Error/Warning C258 Error/Warning C259 Error/Warning C260 Error/Warning C261 Error C262 Error C263 Error C264 Error/Warning C265 Error C267 Error C268 Error/Warning C271 Error C272 Error C273 Error C274 Warning C275 Warning C276 Warning C277 Error C278 Error C279 Error/Warning C280 Error C281 Error C282 Error C283 Error C284 Warning C285 Warning C286 Warning C287 Warning C289 Warning C290 Warning C291 Warning C292 Error