os/arch/i686/interrupts/irq0.s

69 lines
626 B
ArmAsm
Raw Permalink Normal View History

.global irq0
.extern _switch_task
.global jump_kernel
.global jump_user
.extern ss
.extern esp
.extern eflags
.extern cs
.extern eip
irq0:
2024-11-27 21:57:18 +01:00
pusha
2024-11-27 21:57:18 +01:00
mov $0x10, %eax
mov %ax, %ds
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
call _switch_task
iret
jump_kernel:
2024-11-27 21:57:18 +01:00
mov $0x20, %eax
outb %al, $0x20
mov (ss), %eax
mov %ax, %ds
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
2024-11-27 21:57:18 +01:00
popa
2024-11-27 21:57:18 +01:00
mov (esp), %esp
2024-11-27 21:57:18 +01:00
push (ss)
push (esp)
push (eflags)
push (cs)
push (eip)
iret
jump_user:
2024-11-27 21:57:18 +01:00
mov $0x20, %eax
outb %al, $0x20
2024-11-27 21:57:18 +01:00
mov (ss), %eax
mov %ax, %ds
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
2024-11-27 21:57:18 +01:00
popa
push (ss)
push (esp)
push (eflags)
push (cs)
push (eip)
iret