This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

A51 help!

Hi,

I need to be able to call a c function from within the STARTUP.A51 file (actually, any *.a51 file), so that the code listing has the startup code, then the call of this new function, then the LJMP to main.

I imagine this will involve 'exporting' the C function name (label), and using this label as an operand of the asm CALL
instruction, but I can't seem to figure out how to do this.

I'd also be really interested if someone can suggest a more readily understandable assembler manual than the A51 user guide...

Thanks for any suggestions!

David

Parents
  • You can figure out how a function is called using 'main' as an example. List through STARTUP.A51 to find all references to 'main'. It should be something like 'EXTERN something main something'. After such declaration you should be able to use your function name as operand of CALL.

Reply
  • You can figure out how a function is called using 'main' as an example. List through STARTUP.A51 to find all references to 'main'. It should be something like 'EXTERN something main something'. After such declaration you should be able to use your function name as operand of CALL.

Children