taskswitch - how

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
thomas

taskswitch - how

Post by thomas »

Hi.
I try to switch between tasks. I tried f.e. this:
jmp ax:0
(ax is loaded with a tss-selector)
but nasm says no. It will only work with immediate values f.e.:
jmp 8:0
How can i solve this problem?
abc

Re: taskswitch - how

Post by abc »

I think you can only use segment registers with the JMP commands, try something like this:

 PUSH AX            ;Push AX value onto stack
 POP SI               ;put the value into SI
 JMP SI:0x0000    ;Jump
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re: taskswitch - how

Post by df »

jmp double [memory_address_here] etc.
or cast them onto the stack and iret/retf
etc
-- Stu --
Post Reply