You can declare global variables but you have to initialize inside main like this:
char* vidmem;
char* vidmem;
int main()
{
vidmem = (char*)0xb8000;
vidmem[0] = 'x';
vidmem[1] = 0x0f;
}
1
solved Can’t use global variables with gcc
You can declare global variables but you have to initialize inside main like this:
char* vidmem;
char* vidmem;
int main()
{
vidmem = (char*)0xb8000;
vidmem[0] = 'x';
vidmem[1] = 0x0f;
}
1
solved Can’t use global variables with gcc