Altera_Forum
Honored Contributor
20 years agohanding over args from assembler to c
Hi everybody,
maby someone of you has an explenation for this behavior? I am calling a c function from assembler code, handing over two arguments in registers r4 and r5. So far so good. The c function assigns these argumetns to two variables and calls another c function: void my_exception_handler(ulong addr, ulong type) { ExceptionAddr = addr; ExceptionType = type; restart(); } restart sends ExceptionAddr and ExceptionType to the console and restarts the system. The assignment is not working unless I do something in advance. Like: void my_exception_handler(ulong addr, ulong type) { int etemp; etemp = 1; ExceptionAddr = addr; ExceptionType = type; restart(); } http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/blink.gif Any ideas? --wolf