LtG wrote:edit2. Am I reading your code right? Is your data_S in the GDT intentionally 16-bit?
I think I'm going to have an aneurysm, haha.
I swear I reviewed the GDT for a whole week, and my code was still tricky. I did change it, however there was still no difference. Thanks, though!
LtG wrote:Have you tried disassembling the code to see if everything is doing what you'd expect? Especially as it comes to pointers and jump/call destinations? If you can't find any issues, then you could post the disassembly here, I might have a chance tomorrow to try to look thru your code and the disasm.
edit. I don't think you answered whether or not you have attempted to print what is at the KERNEL_OFFSET location (the place you jump to) after reading disk, just to confirm that there's what you expect.
I hadn't implemented any kind of memdump/HexToASCII code yet, but I just expediently wrote some. With your suggestion, I made a hex dump for my memory (gonna have to add it as a command later too -- it seems like a standard beginner-kernel thing, lol) at phys addr 0x10000. We've gotten somewhere now! The output on my VGA monitor is worlds apart from the output from QEMU! Check out these screenshots...
memdump-PHYSICAL.jpg
memdump-QEMU.png
It's those
DAMNED BIOS functions again! I had the same problem with hardware INTs getting the A20 status-check to even work!
The problem is neither of the read functions are working -- I can go back to the old one if I change the loading destination back to 0x1000. But that INT 13h didn't work either. So, does this mean I'm dealing with some kind of automatic CR0 switch from the BIOS that disables its own interrupts or secures them somehow before it calls a bootloader? Is there such a thing?
Thanks again so so so much for the help, and taking your time to view my source-code.
EDIT: Try not to mind the myriad of spaces, NASM likes to drop every bit of data in my entire kernel at the top of the assembled image, I suppose! That includes my ridiculous amounts of spaces for my gloriously pointless splash screen!
~ wrote:In the long run having garbage around will help you ensure you have good code. Distinguishing garbage from actual data is not really difficult.
It may not be difficult, but I personally prefer not to keep it around.