kern

changeset 12:eaec918de072

- fixed the scrolling issue - other minor crap
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 22 Feb 2011 18:51:44 +0200
parents cccaa40f5432
children 6c9138a87e02
files src/intr.c src/main.c src/vid.c
diffstat 3 files changed, 5 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/src/intr.c	Sat Feb 19 04:41:51 2011 +0200
     1.2 +++ b/src/intr.c	Tue Feb 22 18:51:44 2011 +0200
     1.3 @@ -159,7 +159,7 @@
     1.4  	desc->d[3] = (addr & 0xffff0000) >> 16;
     1.5  }
     1.6  
     1.7 -#define IS_TRAP(n)	((n) < 20 && (n) != 2)
     1.8 +#define IS_TRAP(n)	((n) < 32)
     1.9  static void set_intr_entry(int num, void (*handler)(void))
    1.10  {
    1.11  	int type = IS_TRAP(num) ? GATE_TRAP : GATE_INTR;
     2.1 --- a/src/main.c	Sat Feb 19 04:41:51 2011 +0200
     2.2 +++ b/src/main.c	Tue Feb 22 18:51:44 2011 +0200
     2.3 @@ -46,6 +46,8 @@
     2.4  	set_text_color(LTGRAY);
     2.5  	puts("hello world!");
     2.6  
     2.7 +	asm volatile("int $0x80");
     2.8 +
     2.9  	for(;;) {
    2.10  		char c, keypress;
    2.11  		do {
     3.1 --- a/src/vid.c	Sat Feb 19 04:41:51 2011 +0200
     3.2 +++ b/src/vid.c	Tue Feb 22 18:51:44 2011 +0200
     3.3 @@ -3,7 +3,7 @@
     3.4  #include "asmops.h"
     3.5  
     3.6  /* height of our virtual console text buffer */
     3.7 -#define VIRT_HEIGHT	1024
     3.8 +#define VIRT_HEIGHT	200
     3.9  
    3.10  /* CRTC ports */
    3.11  #define CRTC_ADDR	0x3d4
    3.12 @@ -60,7 +60,7 @@
    3.13  		/* The bottom of the visible range reached the end of our text buffer.
    3.14  		 * Copy the rest of the lines to the top and reset start_line.
    3.15  		 */
    3.16 -		memcpy(vmem, vmem + start_line * WIDTH, (HEIGHT - 1) * WIDTH);
    3.17 +		memcpy(vmem, vmem + start_line * WIDTH, (HEIGHT - 1) * WIDTH * 2);
    3.18  		start_line = 0;
    3.19  	}
    3.20