在 13.uart_stdio 在start.s末端增加这个函数
.global ReadCPUSR
ReadCPUSR:
MRS R0, CPSR //; Set IRQ and FIQ bits in CPSR to disable all interrupts
MOV PC, LR
mian.c 中
int a = 0;
int b = 0;
int sr;
char *str = "hello world";
uart_init();
sr=ReadCPUSR();
printf("%s 0x%x\r\n",str,sr);
输出为 :hello world 0x600001d3
可以得出 superboot运行裸机程序时候 是在 管理模式下