First of all congratulations on your forum it has solved a lot of problems i had thus far.
I have started writing my kernel in c++.
I want to implement an ostream equivalent for a high res vga mode.
i have writen this :
Code: Select all
cstream& operator<<(const int& val)
{
int temp = val;
if(val < 10)
(*this) << (char)(temp+48);
else
{
(*this) << (temp/10);
(*this) << (char)(temp+48);
}
return *this;
}
Code: Select all
int main()
{
cstream test;
test << 1000;
while(1)halt();
}
I cant really think something is wrong with the code so perhaps a stack corruption issue?
Does anyone have any clues?