Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to mix assembly and c for avr in IAR compiler

Status
Not open for further replies.

is_razi

Full Member level 3
Joined
Apr 6, 2002
Messages
162
Helped
13
Reputation
26
Reaction score
7
Trophy points
1,298
Location
Tabriz
Activity points
1,189
hi there
i have wrote a c code in ewavr that there is some assembly funtions with joint subroutines.
how can i use these subroutines.
have i create two separate source file for each function.
and have i write these subroutins for each function separately .
yours sincerely
 

Have you read your compiler documentation? I believe it should mention about that.
 

try this:
Code:
main()
{
     ............
     ............
     function_bla_bla();
}

function_bla_bla()
{
     asm{
     ............
     ............
               // here is our asm codes
}
}
 

hi all,
thanks for your replys .i could solve that problem but i have one more question.
as i said i have a c code that uses assembly functions.these assembly functions themselves use some common subroutines .
my question is that how can i define a common subroutine for use in several functions .
(for example suppose lcd function.there is a common write subroutine for initializing and for a clear screen command(for example).how can i define this write subroutine for two assembly functions.)
yours faithfully
:roll: :cry: :?:
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top