diff --git a/init_graphics.c b/init_graphics.c new file mode 100644 index 0000000..21f3348 --- /dev/null +++ b/init_graphics.c @@ -0,0 +1,105 @@ +#include +#include +#include "linux/tty.h" +#define memstart 0xA0000 +#define memsize 64000 +#define cursor_side 3 +#define width 320 +#define height 200 +#define barrier_width 10 +int volatile jumpp; +struct message *headd; +static int n=0; +int sys_get_message() +{ + if(jumpp>0) --jumpp; + return jumpp; +} +int sys_init_graphics() +{ +int i,j,x,y; + char *p=0xA0000; + if(n==0) +{ + outb(0x05,0x3CE); + outb(0x40,0x3CF);// + outb(0x06,0x3CE); + outb(0x05,0x3CF);// + outb(0x04,0x3C4); + outb(0x08,0x3C5);// + + + outb(0x01,0x3D4); + outb(0x4F,0x3D5);// + outb(0x03,0x3D4); + outb(0x82,0x3D5);// + + outb(0x07,0x3D4); + outb(0x1F,0x3D5);// + outb(0x12,0x3D4); + outb(0x8F,0x3D5);// + outb(0x17,0x3D4); + outb(0xA3,0x3D5);// + + + + outb(0x14,0x3D4); + outb(0x40,0x3D5);// + outb(0x13,0x3D4); + outb(0x28,0x3D5);// + + outb(0x0C,0x3D4);// + outb(0x00,0x3D5);// + outb(0x0D,0x3D4);// + outb(0x00,0x3D5);// + n=1; +} + + + + p=memstart; + for(i=0;i=320 || i<20 ) return 0; + if(i==33 || j==33){ +p=0xA0000; + for(i=0;i