📄 swi_service.s
字号:
AREA SWI_Service, CODE, READWRITE ;this is the supervisor service code
DCD 0x00000000
DCD 0x00000000 ; push the next instruction to 0x08
0x08 B Supervisor ; SWI entry point
EntryTable ; addresses of supervisor routines
DCD ZeroRtn
DCD OneRtn
Supervisor
LDR R0,[R14,#-4] ; get SWI instruction
BIC R0,R0,#0xFF000000 ; clear top 8 bits
MOV R1,R0,LSR#8 ; get routine offset
ADR R2,EntryTable ; get start address of entry table
LDR R15,[R2,R1,LSL#2] ; branch to appropriate routine
ZeroRtn
LDR R7,=0x11111111 ; enter with character in R0 bits 0-7
B restore
OneRtn
LDR R7,=0x22222222
B restore
restore
mov R15,R14
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -