Subversion Repositories shark

Rev

Rev 1618 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
42 pj 1
/* Project:     OSLib
2
 * Description: The OS Construction Kit
3
 * Date:                1.6.2000
4
 * Idea by:             Luca Abeni & Gerardo Lamastra
5
 *
6
 * OSLib is an SO project aimed at developing a common, easy-to-use
7
 * low-level infrastructure for developing OS kernels and Embedded
8
 * Applications; it partially derives from the HARTIK project but it
9
 * currently is independently developed.
10
 *
11
 * OSLib is distributed under GPL License, and some of its code has
12
 * been derived from the Linux kernel source; also some important
13
 * ideas come from studying the DJGPP go32 extender.
14
 *
15
 * We acknowledge the Linux Community, Free Software Foundation,
16
 * D.J. Delorie and all the other developers who believe in the
17
 * freedom of software and ideas.
18
 *
19
 * For legalese, check out the included GPL license.
20
 */
21
 
22
/*      Console output functions        */
23
 
24
#ifndef __LL_I386_CONS_H__
25
#define __LL_I386_CONS_H__
26
 
27
#include <ll/i386/defs.h>
28
BEGIN_DEF
29
 
30
/* for reference only */
31
extern int cons_columns; /* number of screen columns */
32
extern int cons_rows;    /* number of screen rows */
33
 
34
 
35
/* X-dependent Console Output functions                 */
36
/* Rememeber that console functions are NOT REENTRANT   */
37
/* The console must be considered a preemtable resource */
38
/* File : Cons.C                                        */
39
 
40
void set_visual_page(int page);
41
void set_active_page(int page);
42
int get_visual_page(void);
43
int get_active_page(void);
44
void place(int x,int y);
45
void getcursorxy(int *x, int *y);
46
int get_attr(void);
47
void cursor(int start,int end);
48
void _clear(char c,char attr,int x1,int y1,int x2,int y2);
49
void clear(void);
50
void _scroll(char attr,int x1,int y1,int x2,int y2);
51
void scroll(void);
52
void bios_save(void);
53
void bios_restore(void);
54
void cputc(char c);
55
void cputs(char *s);
56
int  cprintf(char *fmt,...) __attribute__((format(printf,1,2)));
57
 
58
/* These functions allow direct access to video RAM */
59
/* Hence you can use it without the explicit use of */
60
/* a resource manager                               */
61
/* File : Cons.C                                    */
62
 
63
void putc_xy(int x,int y,char attr,char c);
64
char getc_xy(int x,int y,char *attr,char *c);
65
void puts_xy(int x,int y,char attr,char *s);
66
int printf_xy(int x,int y,char attr, char *fmt,...) __attribute__((format(printf,4,5)));
67
 
68
/* These are simple useful macro! */
69
#define HOME()          place(0,0);
70
#define CRSR_BLOB()     cursor(0,15);
71
#define CRSR_OFF()      cursor(16,16);
72
#define CRSR_STD()      cursor(14,15);
73
#define NL()            cputc('\n');
74
 
75
/* Text mode color definitions */
76
 
77
#define BLACK           0
78
#define BLUE            1
79
#define GREEN           2
80
#define CYAN            3
81
#define RED             4
82
#define MAGENTA         5
83
#define BROWN           6
84
#define LIGHTGRAY       7
85
#define DARKGRAY        8
86
#define LIGHTBLUE       9
87
#define LIGHTGREEN      10
88
#define LIGHTCYAN       11
89
#define LIGHTRED        12
90
#define LIGHTMAGENTA    13
91
#define YELLOW          14
92
#define WHITE           15
93
 
94
END_DEF
95
 
96
#endif
97