Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

video.h File Reference

Low level video controller 6845 driver header. More...

#include <const.h>
#include <kernel/console.h>

Go to the source code of this file.

Defines

#define BLANK   (0x20 | (DEFAULT_COLOR << 8))
 The blank character.

#define VIDEO_MEM_ADDRESS   PHYSICAL(0xB8000)
 The physical address of the video memory buffer.


Functions

bool move_cur (console_t *console)
 Refresh cursor position for a selected console.
Parameters:
console  The selected console address.
Returns:
  • TRUE if the current console is the foreground console;
  • FALSE otherwise.
Note:
There is no reason to refresh the cursor if the selected console is not the foreground console. In this case the function returns a value of FALSE.


void k_clrscr (console_t *console)
 Clear the screen of the selected console.
Parameters:
console  The selected console address.


word k_get_cur_pos (console_t *console)
 Get the cursor position of the selected console.
Parameters:
console  The selected console address.
Returns:
The cursor position (in characters from the beginning of the video buffer).


bool k_set_cur_pos (console_t *console, word pos)
 Set the cursor position of the selected console.
Parameters:
console  The selected console address.
pos  The cursor position (in characters from the beginning of the video buffer).
Returns:
  • TRUE on success;
  • FALSE if the position is over the buffer.


byte k_get_color (console_t *console)
 Get the current color of the selected console.
Parameters:
console  The selected console address.
Returns:
The current color code (see console.h).


void k_set_color (console_t *console, byte attrib)
 Set the current color of the selected console.
Parameters:
console  The selected console address.
attrib  The current color code (see console.h).


void k_scroll_up (console_t *console)
 Scroll up the screen of the selected console.
Parameters:
console  The selected console address.


void k_gotoxy (console_t *console, int x, int y)
 Set the (x, y) coordinates as the current position in the selected console.
Parameters:
console  The selected console address.
x  The column position.
y  The row position.


void _kputchar (console_t *console, byte c)
 Put a character in the selected console.
Parameters:
console  The selected console address.
c  The ASCII code of the character to print.


void _kprintf (const byte *message,...)
void init_video ()
 Initialize the video parameters.

byte k_get_crt_height ()
 Get the CRT height (in characters).
Returns:
The CRT heitht.


byte k_get_crt_width ()
 Get the CRT width (in characters).
Returns:
The CRT width.



Detailed Description

Low level video controller 6845 driver header.

Author:
Andrea Righi <drizzt@inwind.it>
Date:
Last update: 2003-11-08
Note:
Copyright (©) 2003 Andrea Righi

Definition in file video.h.


Define Documentation

#define BLANK   (0x20 | (DEFAULT_COLOR << 8))
 

The blank character.

Definition at line 15 of file video.h.

#define VIDEO_MEM_ADDRESS   PHYSICAL(0xB8000)
 

The physical address of the video memory buffer.

Definition at line 18 of file video.h.


Function Documentation

void _kprintf const byte   message,
...   
 


Generated on Fri Feb 20 15:32:21 2004 for Minirighi by doxygen1.2.18