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.

Assembly and C interface in Keil ARM

Status
Not open for further replies.

girish_wabale

Member level 3
Joined
Mar 21, 2005
Messages
66
Helped
7
Reputation
14
Reaction score
2
Trophy points
1,288
Location
Pune
Activity points
1,861
I want to insert following assembly statements in Keil ARm

MRS R0 ,CPSR

AND R0,R0,#0XFFFFFF7F

MSR CPSR,R0


please suggest me how to do this.

I have tried with __ASM attribute but it gives error

Thanks and Regards
 

if you want to do inline programing like c with asm the use # pragma Asm and end pragma commamds.
you can also write your asm code in seperate file in a subroutine.
you will have to define and declear the asm function.
also use compile through .src in the compiler control menu.
hock
 

Can you give me exact code for above three lines in inline assebly
It is necessery to me as I have to insert assembly statements several times.
Actually it is irritating to make assebly function every time

Thanks and regards
 

Hi girish_wabale,

I do not know keil, but you can try following code.

#asm

MRS R0 ,CPSR

AND R0,R0,#0XFFFFFF7F

MSR CPSR,R0

#endasm

best luck,
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top