Example #1
0
        public static void WriteAt(int x, int y, char c, VgaColour fore, VgaColour back)
        {
            if (x < 0 || x >= Width || y < 0 || y >= Width)
            {
                return;
            }
            int pos = _row * Width + _column;

            *(byte *)(0xb8000 + pos * 2)     = (byte)c;
            *(byte *)(0xb8000 + pos * 2 + 1) = (byte)((int)fore | ((int)back << 4));
        }
Example #2
0
 public static void SetColors(VgaColour foreground, VgaColour background)
 {
     _foreground = foreground;
     _background = background;
 }
Example #3
0
 public static void WriteAt(int pos, char c, VgaColour fore, VgaColour back)
 {
     *(byte *)(0xb8000 + pos * 2)     = (byte)c;
     *(byte *)(0xb8000 + pos * 2 + 1) = (byte)((int)fore | ((int)back << 4));
 }