This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

writing assembly on Keil

I wanna write assembly code on Keil but program got errors about it , how can i write assembly code on Keil . here is my assembly code :

// Macros for Interrupt Nesting
#define IENABLE /* Nested Interrupts Entry */ \

__asm { MRS LR, SPSR } /* Copy SPSR_irq to LR */ \

__asm { STMFD SP!, {LR} } /* Save SPSR_irq */ \

__asm { MSR CPSR_c, #0x1F } /* Enable IRQ (Sys Mode) */ \

__asm { STMFD SP!, {LR} } /* Save LR */ \

#define IDISABLE /* Nested Interrupts Exit */ \

__asm { LDMFD SP!, {LR} } /* Restore LR */ \

__asm { MSR CPSR_c, #0x92 } /* Disable IRQ (IRQ Mode) */ \

__asm { LDMFD SP!, {LR} } /* Restore SPSR_irq to LR */ \

__asm { MSR SPSR_cxsf, LR } /* Copy LR to SPSR_irq */ \

0