I am at quite a loss as to why C is doing this, it is very strange. I first noticed the problem when I attempted the Kernel in C++ tutorial posted here. For some reason the variables will not increment.
It sounds weird but it is happening, look at this code for example:
Code: Select all
char* video = (char*)0xb8000;
*video = 'A';
video++;
*video = 0x1e;
Code: Select all
char* video = (char*)0xb8000;
video[0] = 'A';
video[1] = 0x1e;
I cannot increment variables in any way, none of the following ways work:
Code: Select all
variable++;
variable += 1;
variable = variable + 1;
Thanks.