📄 vectors.s
字号:
#
# File: vectors.s
#
# Purpose: Exception vectors for MPC8XX dBUG
#
#
# Modificiations:
#
#
# Globally accessible symbols
.global VECTOR_TABLE
.extern asm_startmeup
.extern asm_exception_body
.extern asm_isr_handler
.extern dbug_sc_handler
.text
#
# This is the vector table for the MPC8XX. It is placed here so that it
# can be in a FLASH/ROM at bootup to initialize the system. All of the
# exceptions use a generic "exception header" before branching to the
# actual handler.
#
# This file MUST be the first file linked in order for this code to be
# ROM-able.
#
# The generic handler saves r31 into SPRG0, LR into SPRG1, places
# the exception number in r3, and invokes the handler.
#
.equ sprg0,272
.equ sprg1,273
.macro vector NUM,HANDLER
exception_\NUM:
mtspr sprg0,31
mfspr r31,lr
mtspr sprg1,31
bl next\NUM
next\NUM:
mfspr r31,lr
rlwinm r31,r31,0,0,23
lwz r31,vect\NUM - exception_\NUM(31)
mtspr lr,r31
bclrl 20,0
vect\NUM:
.long \HANDLER
.space 256-(10*4),0
.endm
VECTOR_TABLE:
vector 0000,asm_exception_body # reserved
vector 0100,asm_startmeup # hard reset
vector 0200,asm_exception_body # machine check
vector 0300,asm_exception_body # data access
vector 0400,asm_exception_body # instruction access
vector 0500,asm_isr_handler # external interrupt
vector 0600,asm_exception_body # alignment
vector 0700,asm_exception_body # program
vector 0800,asm_exception_body # floating-point unavail
vector 0900,asm_isr_handler # decrementer
vector 0A00,asm_exception_body # reserved
vector 0B00,asm_exception_body # reserved
vector 0C00,dbug_sc_handler # system call
vector 0D00,asm_exception_body # trace
vector 0E00,asm_exception_body # floating point assist
vector 0F00,asm_exception_body # reserved
vector 1000,asm_exception_body # software emulation
vector 1100,asm_exception_body # instruction tlb miss
vector 1200,asm_exception_body # data tlb miss
vector 1300,asm_exception_body # instruction tlb error
vector 1400,asm_exception_body # data tlb error
vector 1500,asm_exception_body # reserved
vector 1600,asm_exception_body # reserved
vector 1700,asm_exception_body # reserved
vector 1800,asm_exception_body # reserved
vector 1900,asm_exception_body # reserved
vector 1A00,asm_exception_body # reserved
vector 1B00,asm_exception_body # reserved
vector 1C00,asm_exception_body # data breakpoint
vector 1D00,asm_exception_body # instruction breakpoint
vector 1E00,asm_exception_body # peripheral breakpoint
vector 1F00,asm_exception_body # development port
######################################################################
.end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -