CPS #16 ;为什么是进入用户模式呢 CPSID ai, #17;为什么是进入FIQ 这个16 17 是怎么来的 哪里有参考啊
用了5个bit的二进制组合表示。
user 模式是10000 2的4次方,正好是 16
FIG 模式是10001 2的4次方+1 所以是17
Modes of operation
In each state there are seven modes of operation:
User (USR) mode is the usual mode for the execution of ARM or Thumb programs. It is used for executing most application programs.
Fast interrupt (FIQ) mode is entered on taking a fast interrupt.
Interrupt (IRQ) mode is entered on taking a normal interrupt.
Supervisor (SVC) mode is a protected mode for the operating system and is entered on taking a Supervisor Call (SVC), formerly SWI.
Abort (ABT) mode is entered after a data or instruction abort.
System (SYS) mode is a privileged user mode for the operating system.
Undefined (UND) mode is entered when an Undefined Instruction exception occurs.
大神 谢谢秒懂 哈哈 加你好友吧