irq.s
来自「一个简单实用的嵌入式操作系统,实现了嵌入式操作系统的基本模块:内存管理、系统调度」· S 代码 · 共 34 行
S
34 行
;/*
; * kernel/asm/irq_novic.s
; *
; * Copyright (C) 2008/05/22 Wang Qiang
; *
; * This program is free software; you can redistribute it and/or modify
; * it under the terms of the GNU General Public License version 2 as
; * published by the Free Software Foundation.
; *
; * history:
; * 2008/05/22, wangqiang , rurality.wq@gmail.com
; * copy from irq.s, modify for the no vic mcu, s3c24xx serial for example
; */
INCLUDE asm\config.inc
INCLUDE mcu\memregions.inc
IMPORT irq_addr_table
EXPORT irq_handler
CODE32
AREA IRQ,CODE,READONLY
irq_handler
sub lr, lr, #4
stmfd sp!, {r0-r3,r12,lr}
ldr r1, =INTOFFSET ; get the interrupt offset register
ldr r2, [r1] ; get the interrupt offset value
ldr r1, =irq_addr_table
add r2, r1, r2, lsl #2 ; get vic addr address
ldr r2, [r2] ; get the interrupt service routine
mov lr, pc
mov pc, r2 ; go to the ISR
irq_end
ldmfd sp!, {r0-r3, r12, pc}^
END
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?