I’m trying to write program which will switch tasks. Everything seems to work properly, but one thing:
IRQ0_handler:
push eax
push screen_selector
pop es
db 9ah ; far call TSS_1:00
dw 00
dw TSS_4
db 9ah ; far call TSS_1:00
dw 00
dw TSS_2
db 9ah ; far call TSS_1:00
dw 00
dw TSS_3
mov al,20h
out 20h,al
pop eax
iret
This irq handler should switch tasks, but it seems that it calls only the last one. Here’s code of one of the tasks (all of them are practically the same, different tasks should display different chars)
TaskOne:
push es
push screen_selector
pop es
mov ah, 1bh
mov al, '1'
mov es:[di], ax
add di, 2
pop es
iret
jmp TaskOne
The code actually should work. It was just trouble with getting chars printed.