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.
How do I know what hexadecimal value goes into the AX for LTR (Load Task Register)? My TSS is the 7th entry for my data section of my GDT. Which value do I use?
bochs prints the one message that is important to look at:
LTR: doesn't point to an available TSS descriptor!
https://github.com/christophersacchi/RazorOS
"... you notice that this scanner will... woah!"
"Moving right along!"
"That must be, uh. That must be why we're not shipping Windows 98 yet..."
"Absolutely. Absolutely."
Hi chrissacchi,
did you execute the LTR AX only once or more times (more times e.g. in case of multitasking)?
If bochs reports the error message for the first LTR AX then you have an error/mistake in your GDT/TSS or you put wrong value into AX, if the error message appears at the second LTR AX (with the same AX value and the first LTR AX passed OK) then you need to implement this:
When executing the LTR for the first time - the available task changes to busy task (1 bit in GDT changes from 0 to 1). If you want to do LTR for the second time then change busy task to available task before executing the LTR AX (just change 1 bit from 1 to 0 in GDT - refer to CPU manuals).
I executed it only once, but I don't know which value to put in AX for the LTR instruction. Is there a specific way to find out?
https://github.com/christophersacchi/RazorOS
"... you notice that this scanner will... woah!"
"Moving right along!"
"That must be, uh. That must be why we're not shipping Windows 98 yet..."
"Absolutely. Absolutely."
you can tell the selector by multiplying your entry number which is 7 (remember to start counting from zero) by the size of each GDT entry which is 8 so your selector is 0x38.
If it works please tell me.