
I am very expert at C/C++ Development and a bit at ASM coding

I started coding my own OS about 2 months ago, and I implemented successfully the GDT, the IDT, exceptions, IRQs (timer, keyboard...) and some Paging (just the base...)
Now I'm trying to get work a simple TSS-based Multitasking Environiment: I wrote the "create_task" function which creates a new task starting from its name, entry function, privilege level and priority. For this I use two lists, one for the tasks and one for the TSSs. I use the function "gdt_add_tss" which adds the new TSS to the GDT and returns its 'selector'.
So I create three tasks: one dummy (just for the LTR command), one for the 'init' program and one for a test task, which prints some 'A' on the console screen. Then I use the lcall/ljmp instruction to switch between the tasks in Timer IRQ. The problem is this: my kernel successfully switches to the 'init' function that prints a welcome message and then to my test task that works as well; but then IRQs stop firing!!!

The scheduler stops, the keyboard doesn't respond... it should print the scancode on the screen but no, I can't even reboot the system! >:(
Can someone help me??? I'll post the code if it's necessary. ;D