??? 08/06/06 10:50 Read: times |
#121723 - More reading required Responding to: ???'s previous message |
This tells you what the variables are:
int function(int v_a, char v_b, bit v_c,long v_d,bit v_e) RSEG ?DT?function?CSAMPLE1 ?function?BYTE: v_a?040: DS 2 //int v_b?041: DS 1 //char v_d?043: DS 4 //long RSEG ?BI?function?CSAMPLE1 ?function?BIT: v_c?042: DBIT 1 //bit v_e?044: DBIT 1 //bit Your parameters for the subroutine are passed in memory locations. The linker will give these locations an absolute address. These locations may be used by other routines as they sare not static variables. The compiler uses a pool of memory to pass variables. Note: your function does not return any values! I usually don't call 'c' functions from assembler so I'd have to read the manual to figure it out. At a guess, the compiler/asm/linker does not know what your are trying to call and it cannot check the variables you are passing from the asm function to the 'c' function. Keep it simple - call asm routines from 'c' only! |
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 |