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.
Setting the TSS is breaking my OS!
Setting the TSS is breaking my OS!
- Attachments
-
- teos32nob.zip
- (14.72 KiB) Downloaded 133 times
yo check this out!!!!111! https://youtu.be/s_mjU-dFu-g?feature=shared
-
- Member
- Posts: 5568
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Setting the TSS is breaking my OS!
What kind of debugging have you tried so far?
Re: Setting the TSS is breaking my OS!
well... I think none
yo check this out!!!!111! https://youtu.be/s_mjU-dFu-g?feature=shared
-
- Member
- Posts: 5568
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Setting the TSS is breaking my OS!
Most virtual machines have some debugging capabilities. Are you using a virtual machine, and if so, which one?
Re: Setting the TSS is breaking my OS!
I'm using virtualbox to test my OS
yo check this out!!!!111! https://youtu.be/s_mjU-dFu-g?feature=shared
-
- Member
- Posts: 5568
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Setting the TSS is breaking my OS!
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.
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.
-
- Member
- Posts: 797
- Joined: Fri Aug 26, 2016 1:41 pm
- Libera.chat IRC: mpetch
Re: Setting the TSS is breaking my OS!
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.
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.
Re: Setting the TSS is breaking my OS!
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
Both answer where good in my opinion, I really needed a debugger
TYSM!!! I could never come to that conclusion... hehe
yo check this out!!!!111! https://youtu.be/s_mjU-dFu-g?feature=shared