Page 1 of 1

Problems withing printing text (PMODE)

Posted: Wed Apr 20, 2005 12:38 pm
by ash_wales
Hi :)

Well basically, if I make a the video memory variable global (0xb8000) It wont print anything to the screen, whereas, If I put the variable inside the function that has to be printed, it works fine. Any idea? or any other info needed?

Heres the Print Function:

Code: Select all


void k_clear() // clear the entire text screen
{
   char *vidmem = (char *)0xb8000;
   unsigned int i=0;
   while(i < (80*25*2))
   {
      vidmem[i]=' ';
      i++;
      vidmem[i]=0x07;
      i++;
   };
};

Used from the barebones tutorial. Thanks.

Re:Problems withing printing text (PMODE)

Posted: Wed Apr 20, 2005 2:16 pm
by Warrior
Try using #define

Re:Problems withing printing text (PMODE)

Posted: Wed Apr 20, 2005 3:02 pm
by ash_wales
I think that the problem may lie in that im running gentoo64..., therefor assembling and compiling for the 64bit archtiecture an creating 64bit elf files. Gotta try and sort that out..

Re:Problems withing printing text (PMODE)

Posted: Wed Apr 20, 2005 9:13 pm
by omin0us
if you are compiling with gcc, then maybe try using the -m32 switch to compile it as 32bit code.

Re:Problems withing printing text (PMODE)

Posted: Thu Apr 21, 2005 2:31 am
by Pype.Clicker
that looks like a "missing data section" issue, too.