Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Vga_console Class Reference

Console implementation for VGA. More...

#include <vga_console.h>

Inheritance diagram for Vga_console:

Console List of all members.

Public Member Functions

void clear ()
 Clear the screen,.
void scroll (unsigned n)
 Scroll the screen n lines up.
Address video_base () const
 Get the base address for the VGA memory.
void video_base (Address base)
 Set the base address of the VGA memory.
 Vga_console (Address base, unsigned width=80, unsigned height=25, bool light_white=false, bool use_color=false)
 Create a new instance of a VGA console.
 ~Vga_console ()
 dtor.
int write (char const *str, size_t len)
 Output method.
int getchar (bool blocking=true)
 Empty implementation.
bool const is_working ()
Mword get_attributes () const
 Console attributes.

Private Types

enum  { MAX_ANSI_ESC_ARGS = 5 }

Private Member Functions

void blink_cursor (unsigned x, unsigned y)
 Set blinking screen cursor.
int seq_6 (char const *str, size_t len, unsigned &pos)
int seq_1 (char const *, size_t, unsigned &)
int seq_5 (char const *, size_t, unsigned &)
void ansi_attrib (int a)
void esc_write (char const *str, size_t len, unsigned &i)
void ansi_esc_write (char const *str, size_t len, unsigned &i)
void normal_write (char const *str, size_t len, unsigned &i)

Private Attributes

Vga_console::VChar packed
 Type of a on screen character.
VChar_video_base
Address _crtc
unsigned _width
unsigned _height
unsigned _x
unsigned _y
unsigned _attribute
int ansi_esc_args [MAX_ANSI_ESC_ARGS]
unsigned num_ansi_esc_args
void(Vga_console::* wr )(char const *, size_t, unsigned &)
bool const _light_white
bool const _use_color
bool _is_working

Classes

struct  VChar
 Type of a on screen character. More...

Detailed Description

Console implementation for VGA.

This console is a output only console for VGA. It implements an ANSI ESC capable output device.


Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
MAX_ANSI_ESC_ARGS 


Constructor & Destructor Documentation

Vga_console::Vga_console Address  base,
unsigned  width = 80,
unsigned  height = 25,
bool  light_white = false,
bool  use_color = false
 

Create a new instance of a VGA console.

Parameters:
base the base address of the VGA memory.
width the width of the screen.
height the height of the screen.
light_white if set to true the color grey is replaced with white.
use_color says whether ANSI ESC colors should be passed (=true) to the video memory or not (=false).

Vga_console::~Vga_console  ) 
 

dtor.


Member Function Documentation

void Vga_console::ansi_attrib int  a  )  [inline, private]
 

void Vga_console::ansi_esc_write char const *  str,
size_t  len,
unsigned &  i
[private]
 

void Vga_console::blink_cursor unsigned  x,
unsigned  y
[private]
 

Set blinking screen cursor.

void Vga_console::clear  ) 
 

Clear the screen,.

void Vga_console::esc_write char const *  str,
size_t  len,
unsigned &  i
[private]
 

Mword Vga_console::get_attributes  )  const [virtual]
 

Console attributes.

Reimplemented from Console.

int Vga_console::getchar bool  blocking = true  )  [virtual]
 

Empty implementation.

Reimplemented from Console.

bool const Vga_console::is_working  )  [inline]
 

void Vga_console::normal_write char const *  str,
size_t  len,
unsigned &  i
[private]
 

void Vga_console::scroll unsigned  n  ) 
 

Scroll the screen n lines up.

Parameters:
n number of lines to scroll.

int Vga_console::seq_1 char const *  ,
size_t  ,
unsigned & 
[inline, private]
 

int Vga_console::seq_5 char const *  ,
size_t  ,
unsigned & 
[inline, private]
 

int Vga_console::seq_6 char const *  str,
size_t  len,
unsigned &  pos
[inline, private]
 

void Vga_console::video_base Address  base  ) 
 

Set the base address of the VGA memory.

Parameters:
base the base address of the VGA memory.

Address Vga_console::video_base  )  const
 

Get the base address for the VGA memory.

Returns:
The base address of the VGA memory.

int Vga_console::write char const *  str,
size_t  len
[virtual]
 

Output method.

Reimplemented from Console.


Member Data Documentation

unsigned Vga_console::_attribute [private]
 

Address Vga_console::_crtc [private]
 

unsigned Vga_console::_height [private]
 

bool Vga_console::_is_working [private]
 

bool const Vga_console::_light_white [private]
 

bool const Vga_console::_use_color [private]
 

VChar* Vga_console::_video_base [private]
 

unsigned Vga_console::_width [private]
 

unsigned Vga_console::_x [private]
 

unsigned Vga_console::_y [private]
 

int Vga_console::ansi_esc_args[MAX_ANSI_ESC_ARGS] [private]
 

unsigned Vga_console::num_ansi_esc_args [private]
 

struct Vga_console::VChar Vga_console::packed [private]
 

Type of a on screen character.

void(Vga_console::* Vga_console::wr)(char const *, size_t, unsigned &) [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Sep 26 14:20:18 2005 for Fiasco by  doxygen 1.4.2