os/arch/i686/interrupts/irq0.s

63 lines
542 B
ArmAsm

.global irq0
.extern _switch_task
.global jump_kernel
.global jump_user
.extern ss
.extern esp
.extern eflags
.extern cs
.extern eip
irq0:
push %esp
push %ebp
push %edx
push %ecx
push %ebx
push %eax
call _switch_task
iret
jump_kernel:
pop %eax /* pop return instruction */
pop %eax
pop %ebx
pop %ecx
pop %edx
pop %ebp
pop %esp
push (eflags)
push (cs)
push (eip)
iret
jump_user:
pop %eax /* pop return instruction */
pop %eax
pop %ebx
pop %ecx
pop %edx
pop %ebp
push (ss)
push (esp)
push (eflags)
push (cs)
push (eip)
iret