How To Pass global variables to external assember functions

1 post / 0 new
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How do I pass a variable to an external assembler function under AVR-GCC.
By external I mean a linked *.s file. I know how to pass them from within the function call.
But I have a number of global variables that I would like the assembler to have access to.

Any help would be appreciated.
If anyone is interested I am trying to port AVRs I2C routines to build an I2C controlled UART.
i.e. i2c_in -----> serial out
i2c_out <---- serial in

So if you have code to this it would also be appreciated.

admin's test signature