blob: fce98110d6d486de97812b77b2c7be4ce2ce8e06 [file] [log] [blame]
swissChili1e8b7562021-12-22 21:22:57 -08001 [global _switch_to_task]
2_switch_to_task: ; (uint page_directory, struct
3 ; registers regs)
4 add esp, 4 ; We don't care about return address
5 pop eax
6 mov cr3, eax ; Change page directories
7 pop eax
8 mov ds, ax ; First is ds
9 popad ; Then the rest of the registers
10 add esp, 8 ; Then IRQ # and error #
11 iret ; And finally the saved state