📄 sanoslib.s
字号:
;; file: SanOSasmlib.s
;; by : Sanicle
;; ver : 2005.03.20
;; from: http://3mn.net
AREA SanFuncs,CODE,READONLY
;;;;;;;;;; Fuctions
EXPORT SanSaveSR
SanSaveSR
mrs r0,CPSR
orr r1,r0,#0xc0
msr CPSR_c,r1
mov pc,lr
EXPORT SanRestoreSR
SanRestoreSR
msr CPSR_c,r0
mov pc,lr
;==============
; CPSR I,F bit
;==============
;int SET_IF(void);
;The return value is current CPSR.
EXPORT SET_IF
SET_IF
;This function works only if the processor is in previliged mode.
mrs r0,cpsr
mov r1,r0
orr r1,r1,#0xc0
msr cpsr_cxsf,r1
mov pc,lr
;void WR_IF(int cpsrValue);
EXPORT WR_IF
WR_IF
;This function works only if the processor is in previliged mode.
msr cpsr_cxsf,r0
mov pc,lr
;void CLR_IF(void);
EXPORT CLR_IF
CLR_IF
;This function works only if the processor is in previliged mode.
mrs r0,cpsr
bic r0,r0,#0xc0
msr cpsr_cxsf,r0
mov pc,lr
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -