Task Switch: JMP DWORD AX:0x12345678 doesn't work
Posted: Mon Aug 18, 2008 11:21 am
Hey everyone!
I've tried to make a hardware based task switch. First of all, I load a selector into ax:
Now ax holds a selector of a gdt entry which points to a tss of a task. Now, all I have to do is making a far jmp using this selector as segment. Offset can be a random value, because it will be ignored. So I tried this:
But the assembler (nasm) doesn't like it. So how can I handle it? I need ax (or it's value) to do a correct jump.
I've tried to make a hardware based task switch. First of all, I load a selector into ax:
Code: Select all
mov esi,[tasking_current] ;base of a task table entry
add esi, 0x00000002 ; TSS selector for a task
mov word ax, [es:esi] ; Now the selector is in ax
Code: Select all
jmp dword ax:0x12345678