.global irq0 .extern _switch_task .global jump_kernel .global jump_user .extern ss .extern esp .extern eflags .extern cs .extern eip irq0: pusha mov $0x10, %eax mov %ax, %ds mov %ax, %es mov %ax, %fs mov %ax, %gs call _switch_task iret jump_kernel: mov $0x20, %eax outb %al, $0x20 mov (ss), %eax mov %ax, %ds mov %ax, %es mov %ax, %fs mov %ax, %gs popa mov (esp), %esp push (ss) push (esp) push (eflags) push (cs) push (eip) iret jump_user: mov $0x20, %eax outb %al, $0x20 mov (ss), %eax mov %ax, %ds mov %ax, %es mov %ax, %fs mov %ax, %gs popa push (ss) push (esp) push (eflags) push (cs) push (eip) iret