Hello All: How can I reference the start address of the startup code in start167.a66 in a C file? The only thing I can think of doing is
extern void C_STARTUP(void);
Seems likes I've found the way. In your startup.a66 find the following:
?C_RESET PROC TASK C_STARTUP INTNO RESET = 0 ?C_STARTUP: LABEL Model ... ?C_RESET ENDP ?C_STARTUP_CODE ENDS
C_RESET PROC TASK C_STARTUP INTNO RESET = 0 PUBLIC C_RESET ?C_STARTUP: LABEL Model ... C_RESET ENDP ?C_STARTUP_CODE ENDS
extern void C_RESET(void);
Cool! Thanks Mike, I'll give that a try -Walt
I must say, I've never understood the use of ? instead _ in the assy. files. Since ? is an illegal C start char for a label means we can never extern these labels. Most implementations use a leading underscore. I see your fix should work but does it have any other implications? - Mark
I must say, I've never understood the use of ? instead _ in the assy. files. Since ? is an illegal C start char for a label means we can never extern these labels. Most implementations use a leading underscore. I see your fix should work but does it have any other implications?<br> <br> - Mark
It did it again :-(( - second try - I thought that was the whole idea of using '?': the user should not have access to such sort of things, although it's nice to have it sometimes. A bit more flexibility would not hurt since we are already allowed to edit startup.a66. As for unexpected implications, I don't think there are any. ?C_RESET is a local symbol, so no side effects outside startup.a66. None inside also, at least it seems so.
As for unexpected implications, I don't think there are any. ?C_RESET is a local symbol, so no side effects outside startup.a66. None inside also, at least it seems so. Oh. Okay, then maybe the correct method should be to define a global label in the file for use by C functions that is set equal to the ?C_RESET label? - Mark
That was my initial idea, but I didn't want to work through the assembler manual to find out how it's done. Defining an independent global label seen by C mudules would be a safer way.