trapasm.s
来自「类unix x86平台的简单操作系统」· S 代码 · 共 39 行
S
39 行
.text.globl trap.globl trapret1.globl alltrapsalltraps: /* vectors.S sends all traps here */ pushl %ds # build pushl %es # trap pushal # frame movl $16,%eax # SEG_KDATA << 3 movw %ax,%ds # kernel movw %ax,%es # segments pushl %esp # pass pointer to this trapframe call trap # and call trap() addl $4, %esp # return falls through to trapret... /* * a forked process RETs here * expects ESP to point to a Trapframe */.globl traprettrapret: popal popl %es popl %ds addl $0x8, %esp /* trapno and errcode */ iret.globl forkret1forkret1: movl 4(%esp), %esp jmp trapret.globl acpuacpu: .long 0
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?