wip: multitasking: change eip but not working

This commit is contained in:
2025-01-21 10:41:27 +01:00
parent d889a251ef
commit 57ce3c792d
3 changed files with 9 additions and 5 deletions

View File

@ -10,8 +10,9 @@ switch_to_task:
push esi
// save the current stack pointer to the old stack
mov [current_task], esp
mov edi, [eip_backup]
mov [current_task+0], esp
mov edi, [esp_backup] // get eip
mov [current_task+16], edi // save instruction before Interrupt
// stack pointer + the 4 regs pushed
@ -31,7 +32,8 @@ switch_to_task:
// mov cr3, ebx
// TODO replace the eip store in stack by the [current_task+16](current_task->eip)
mov edi, [current_task+16]
mov [esp_backup], edi
.END:
pop esi
pop edi