Tim, this was also very helpful to me also. Thanks. Besides plain variables, what do you do to pass C arrays and C structs? Steve From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf Of Tim Mitchell Sent: Tuesday, March 27, 2012 1:51 AM To: AVR-Chat@yahoogroups.com Subject: RE: [AVR-Chat] Re: Mixing C and assembly with special requirements. I'm a bit of an assembly nut and have had good results mixing asm and c. (But not reserving registers, that just ties the compiler in knots) I create an asm.s file in the project and define any variables I need in one of the c files. Then using .extern in the asm file you can use that variable. If it's not an assembly routine you pass parameters using register pairs, there is a good AVRGCC help page listing which registers are used. For example this is a timer interrupt handler for pulse width modulating an RGBW LED in assembler [Non-text portions of this message have been removed]
Message
RE: [AVR-Chat] Re: Mixing C and assembly with special requirements.
2012-03-28 by Steve Hodge
Attachments
- No local attachments were found for this message.