??? 08/17/06 06:39 Read: times |
#122414 - NOREGPARAMS Responding to: ???'s previous message |
Kuldeep Singh said:
i have assembled following c file to src #pragma SRC #pragma SMALL #pragma NOREGPARMS int function(int v_a, char v_b, bit v_c,long v_d,bit v_e) { v_d=v_a+v_b; } Goran Igic said:
KEIL uses R7,R6,R5... to pass data between C functions Keil C51 would normally use registers to pass parameters to 'C' fucntions: http://www.keil.com/support/m...cparam.htm However, because Kuldeep has used the NOREGPARAMS directive, he has forced the compiler to use fixed memory locations instead - that is the meaning of these lines: v_a?040: DS 2 v_b?041: DS 1 v_d?043: DS 4 The question is, Kuldeep, why are you using NOREGPARAMS? |
Topic | Author | Date |
calling c function from assembly | 01/01/70 00:00 | |
More reading required | 01/01/70 00:00 | |
AsmCallC | 01/01/70 00:00 | |
Absolute addresses?? | 01/01/70 00:00 | |
legacy | 01/01/70 00:00 | |
not really | 01/01/70 00:00 | |
NOREGPARAMS | 01/01/70 00:00 | |
Keil example | 01/01/70 00:00 | |
undefined varibales | 01/01/70 00:00 | |
Wouldnt it be easier... | 01/01/70 00:00 | |
Eh??? | 01/01/70 00:00 | |
inline | 01/01/70 00:00 | |
what I do and recommend![]() | 01/01/70 00:00 |