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.

Keil mix assembly language and C question

Status
Not open for further replies.

tom12sg

Member level 2
Joined
Feb 1, 2004
Messages
45
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,288
Activity points
422
assembly language in c in keil

Hi,

I need to set a flag in an assembly routine in a file so that the C main function in another file can monitor that this function has been activated.
This flag will be a global bit.

How can I declare that in C and reference to this flag in assembly file? or the other way round.

I think on the C side is declare something like this:
volatile bit flag_triggered;

but how to import this flag on the assembly side?

Thanks!
 

Not only flag can be passing between C and Assembly in keil.

For flag keil use CY, for var long, int, char etc use R4,R5, R6, R7.

Please read book in Passing parameter topic.

Best Regard

Added after 2 minutes:

I will try to explain this topic and example.
Please wait a moment.

Best Regard
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top