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.
Alright so I decided to start writing the kernel of my OS and to start off I tried to simply output one character by writing to video memory, so I turned to your handy OSDev wiki and I got mixed results. If I call SetColor(...) and input 7 and 0 it prints the character correctly, but I wanted to have a default attribute (so I wouldn't have to call SetColor(...) so I just simply initialized it to 0x07 and this is where the problem occurs. The character doesn't show on screen so I'm assuming the initialization isn't working. I only modified the wiki example a bit which in my head seems to make sense and yet and it doesn't work. Can anyone help me understand why this doesn't work?
Alright new problem,
Everything seems to print and is programmed correctly yet the StrLen function is reporting the null character too soon in the string (it only seems to print the first 7 characters of the string).
I assumed gcc automatically puts in the terminating null character at the end of the string, yet my StrLen function reports it too soon. The programming seems right, am I missing something or is this another error related to linking/compiling etc. ?
Thanks for the help, but this error seems to have resurfaced (apparently I didn't fix it the first time). Everything seems to have gone well when I used my kernel at 1000h(physical) but since I decided to relocate to 10000h(physical) this error came back up. For some reason every time this code is compiled it refuses to initialize my 'Attrib' variable. My linker script seems to work fine (strings are in the right location, kernel is where it's supposed to be, etc.) but yet this code continues to be defiant. I'm using gcc with the following paremeters (-Wall -ffreestanding -finline-functions -nostdinc -I./include -c main.c -o main.o) would any of this cause the global variable 'Attrib' not to be initialized (directly after declaration)?