.intel_syntax noprefix .set CLEAR_ERRNO_INTNO, 0x08 .section .text .global switch_thread switch_thread: mov eax, [esp + 4] mov esp, eax pop eax mov ds, eax popa call pic_send_eoi add esp, CLEAR_ERRNO_INTNO iret