该手册说
陷阱指令
当程序发出陷阱指令时,处理器会生成软件陷阱异常.当程序需要操作系统进行维护时,程序通常会发出软件陷阱.操作系统的常规异常处理程序确定陷阱的原因并作出适当的响应.
然而,当我之前询问它时,答案说这是一个软件中断:
对于不同的体系结构,异常和中断之间的差异似乎也略有不同,因此可以有4种hw,sw,异常和中断的组合(?).
现在我正在研究这个小型系统的程序集,我认为我可以自己学习个别指令,但我正在寻求帮助以了解更大的图景,为什么事件完全是软件异常,而不是硬件异常,硬件中断,软件中断.
# The label alt_main is defined in this file.
# There is a call to this label in the Altera-supplied startup code for Nios II.
# At label alt_main, interrupts and handlers are initialized; thereafter,
# the label main is called, starting the main program.
################################################################
#
# Definitions for important devices and addresses in this system.
#
# Uart_0 at 0x860
.equ de2_uart_0_base,0x860
# Timer_1 at 0x920, interrupt index 10 …Run Code Online (Sandbox Code Playgroud)