Hey everyone, I'm fairly new to OS development and I've gotten a pretty good understanding of how most of it works, so my friend and I decided to start developing an kernel.
Our latest (and not quite working) version is at https://github.com/Sparky81/AlphaOS
I'm having a few problems with the kernel, though:
it won't finish the name of the second person and the bullets.
Can someone look through the code at https://github.com/Sparky81/AlphaOS/tre ... src/kernel for me please?
I'm pretty darn sure the problem is in Video.cpp, I just can't figure out what it is.
C++ Kernel Issues
- NickJohnson
- Member
- Posts: 1249
- Joined: Tue Mar 24, 2009 8:11 pm
- Location: Sunnyvale, California
Re: C++ Kernel Issues
There are a few things in Video.cpp that seem off: the screen is 80 by 25 characters, not 100 by 45, and you should break after performing the newline operation (that is what the bullet is.) This should be better, although I don't think it will fix your problem entirely:
The part about not printing the entire string probably is due to some sort of corruption elsewhere if fixing the put() function doesn't help.
Code: Select all
void Video::put(char c)
{
if (c == '\n')
{
pos=0;
off += 80;
return;
}
if (pos>=80)
{
pos=0;
off += 80;
}
if (off>=(80*25))
{
clear();
off = 0;
}
videomem[off + pos] = (unsigned char)c|0x0700;
pos++;
}
Re: C++ Kernel Issues
It worked! Thanks so much!