     PRESERVE8 

















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































    EXPORT    get_status
    EXPORT    enable_ints
    EXPORT    disable_ints
    EXPORT    restore_ints
    EXPORT    EnableFIQ
    EXPORT    DisableFIQ
    EXPORT    LockOutFIQ
    EXPORT    ReEnableFIQ



















































    AREA InterruptUtils, CODE, READONLY

     CODE32




get_status
    MRS     r0, CPSR
    BX      LR

enable_ints
    MRS     r0, CPSR
    BIC     r0, r0, #0x80:OR:0x40
    MSR     CPSR_c, r0
    BX      LR

disable_ints
    MRS     r0, CPSR
    ORR     r1, r0, #0x80:OR:0x40
    MSR     CPSR_c, r1
    BX      LR

restore_ints
    MSR     CPSR_c, r0
    BX      LR


EnableFIQ
   MRS     r0,cpsr
   BIC     r1,r0,#0x40   
   MSR     cpsr_c,r1 
   BX      lr


LockOutFIQ
       MRS  r0,cpsr        
       ORR  r1,r0,#0x40     
       MSR  cpsr_cxsf,r1   
       BX      lr


ReEnableFIQ
DisableFIQ
   MSR     cpsr_c,r0   
   BX      lr              



    END
