conio.h File Reference

#include <libc.h>

Go to the source code of this file.

Data Structures

struct  s_conio

Defines

#define __MACHDEP_CONIO_H__   1
#define CGA_WIDTH   80
#define CGA_HEIGHT   25
#define CONIO_ESCAPE   (1<<0u)
#define CONIO_CSI   (1<<1u)
#define CONIO_PN   (1<<2u)
#define CONIO_LASTCOL   (1<<3u)
#define IO_CGA_INDEX   0x03D4
#define IO_CGA_DATA   0x03D5
#define CURSOR_LO   0x0F
#define CURSOR_HI   0x0E
#define CGA_BUF   0xb8000
#define CONIO_PUTCHAR(Conio, PosX, PosY, Char, Attrib)
#define CONIO_GETCHAR(Conio, PosX, PosY)   ((Conio)->buf[((PosX) + (PosY) * (Conio)->width) * 2])
#define CONIO_GETATTRIB(Conio, PosX, PosY)   ((Conio)->buf[(((PosX) + (PosY) * (Conio)->width) * 2) + 1])
#define CONIO_FG(Attrib)   ((Attrib) & 0xf)
#define CONIO_BG(Attrib)   ((Attrib & 0xf0) >> 4)

Typedefs

typedef s_conio t_conio

Enumerations

enum  {
  ATTRIB_BLACK = 0x0, ATTRIB_BLUE = 0x1, ATTRIB_GREEN = 0x2, ATTRIB_CYAN = 0x3,
  ATTRIB_RED = 0x4, ATTRIB_MAGENTA = 0x5, ATTRIB_YELLOW = 0x6, ATTRIB_WHITE = 0x7,
  ATTRIB_BRIGHT = 0x8, ATTRIB_BLACK_BG = 0x00, ATTRIB_BLUE_BG = 0x10, ATTRIB_GREEN_BG = 0x20,
  ATTRIB_CYAN_BG = 0x30, ATTRIB_RED_BG = 0x40, ATTRIB_MAGENTA_BG = 0x50, ATTRIB_YELLOW_BG = 0x60,
  ATTRIB_WHITE_BG = 0x70, ATTRIB_BLINK = 0x80
}

Functions

void conio_gotoxy (t_conio *c, int x, int y)
void conio_getxy (t_conio *c, int *x, int *y)
void conio_clrscr (t_conio *c)
void conio_scrollup (t_conio *c)
void conio_process_buf (t_conio *c, char *buf, int len)
void conio_process_char (t_conio *c, char ch)

Variables

t_conio gl_conio


Define Documentation

#define __MACHDEP_CONIO_H__   1
 

#define CGA_BUF   0xb8000
 

#define CGA_HEIGHT   25
 

#define CGA_WIDTH   80
 

#define CONIO_BG Attrib   )     ((Attrib & 0xf0) >> 4)
 

#define CONIO_CSI   (1<<1u)
 

#define CONIO_ESCAPE   (1<<0u)
 

#define CONIO_FG Attrib   )     ((Attrib) & 0xf)
 

#define CONIO_GETATTRIB Conio,
PosX,
PosY   )     ((Conio)->buf[(((PosX) + (PosY) * (Conio)->width) * 2) + 1])
 

#define CONIO_GETCHAR Conio,
PosX,
PosY   )     ((Conio)->buf[((PosX) + (PosY) * (Conio)->width) * 2])
 

#define CONIO_LASTCOL   (1<<3u)
 

#define CONIO_PN   (1<<2u)
 

#define CONIO_PUTCHAR Conio,
PosX,
PosY,
Char,
Attrib   ) 
 

Value:

(Conio)->buf[((PosX) + (PosY) * (Conio)->width) * 2] = (Char);\
  (Conio)->buf[(((PosX) + (PosY) * (Conio)->width) * 2) + 1] = (Attrib);

#define CURSOR_HI   0x0E
 

#define CURSOR_LO   0x0F
 

#define IO_CGA_DATA   0x03D5
 

#define IO_CGA_INDEX   0x03D4
 


Typedef Documentation

typedef struct s_conio t_conio
 


Enumeration Type Documentation

anonymous enum
 

Enumerator:
ATTRIB_BLACK 
ATTRIB_BLUE 
ATTRIB_GREEN 
ATTRIB_CYAN 
ATTRIB_RED 
ATTRIB_MAGENTA 
ATTRIB_YELLOW 
ATTRIB_WHITE 
ATTRIB_BRIGHT 
ATTRIB_BLACK_BG 
ATTRIB_BLUE_BG 
ATTRIB_GREEN_BG 
ATTRIB_CYAN_BG 
ATTRIB_RED_BG 
ATTRIB_MAGENTA_BG 
ATTRIB_YELLOW_BG 
ATTRIB_WHITE_BG 
ATTRIB_BLINK 


Function Documentation

void conio_clrscr t_conio c  ) 
 

void conio_getxy t_conio c,
int *  x,
int *  y
 

void conio_gotoxy t_conio c,
int  x,
int  y
 

void conio_process_buf t_conio c,
char *  buf,
int  len
 

manages a few vt100 escape codes such as standout, character positioning etc

void conio_process_char t_conio c,
char  ch
 

void conio_scrollup t_conio c  ) 
 


Variable Documentation

t_conio gl_conio
 

default conio


Generated on Wed May 24 23:05:55 2006 for LSE/OS by  doxygen 1.4.6