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.
Hello ladies and gentleman. I am new to this forum so sorry if somehow I broke a rule
I want to create a working TSS for my OS, but it is stopping my OS from working.
I really dont know what is happening but when I remove the TSS the KERNLDR just works fine!
I would really appreciate any help about it.
VirtualBox has some logging capabilities and a built-in debugger. The logs might give some hints about what's wrong, and you can use the debugger to examine your code while it's running. You can share the logs here if you're not sure how to interpret them. Unfortunately I'm not very familiar with VirtualBox, so I can't give you any more specific advice than that.
You may have better luck using a different virtual machine, such as QEMU or Bochs. QEMU has much better logging functions, but requires an external debugger (usually GDB). Bochs has a built-in debugger.
I'd recommend using BOCHS debugger to step through the code to see where things go wrong. BOCHS is better suited for debugging real mode code than QEMU (IMHO). In this case you read 23 sectors of 512 bytes (11766 bytes = 0x2E00 bytes) from KERNLDR.SYS to memory address 0x500. This means you are reading code/data to address 0x500 to 0x3300 (0x500+0x2E00). You then read TEOS32.TEX to 0x3000. 0x3000 < 0x3300 so you have started to overwrite TEOS32.TEX on top of the memory where your KERNLDR.SYS was loaded into memory. To fix this in kernldr.asm change 0x3000 to something higher like 0x4000 (or some other value that won't collide with memory you are already using).
Likely this worked without the TSS since the TSS added over 8KiB to your KERNLDR.SYS and never reached memory address 0x0000:0x3000 so reading TEOS32.TEX to 0x0000:0x3000 wasn't a problem.
OOOOOOHH I SEE NOW!!! THANK YOU DUDE
Both answer where good in my opinion, I really needed a debugger
TYSM!!! I could never come to that conclusion... hehe