diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-11-26 23:17:55 +0100 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-11-26 23:17:55 +0100 |
| commit | 7393db6692c861bc66164c0dd9b83f23a554775b (patch) | |
| tree | d60c9deb33630d5fb6117c7c1bbc098e62a66f28 /video | |
| parent | 9c8cfc2e52b0446f7cab14325028075760869b45 (diff) | |
changes, improvements and cleanup
Diffstat (limited to 'video')
| -rw-r--r-- | video/console.c | 8 | ||||
| -rw-r--r-- | video/console.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/video/console.c b/video/console.c index 5b6e103..743aaac 100644 --- a/video/console.c +++ b/video/console.c @@ -1,4 +1,5 @@ #include "console.h" +#include "kernel/spinlock.h" #include "kernel/config.h" //#define FOOLOS_CONSOLE @@ -109,11 +110,12 @@ void scr_nextline() void scr_put_char(char ch,char col) { + lock_spin(6); if(ch=='\n')scr_nextline(); else if(posx<SCR_WIDTH) { - print_char_col(posx,posy,ch,SCR_GREEN); + print_char_col(posx,posy,ch,col); posx++; } @@ -121,6 +123,8 @@ void scr_put_char(char ch,char col) if(posx>=SCR_WIDTH)scr_nextline(); #endif + lock_release(6); + } @@ -161,7 +165,7 @@ void scr_put_string(char *str) void scr_backspace() { if(posx==0)return; - print_char_col(posx-1,posy,'@',SCR_LGREEN); + print_char_col(posx-1,posy,' ',SCR_LGREEN); posx--; } diff --git a/video/console.h b/video/console.h index 74ec50c..71c3c72 100644 --- a/video/console.h +++ b/video/console.h @@ -3,7 +3,7 @@ // 80 x 24 // TODO: implement VT100 -#include "lib/int/stdint.h" +#include <stdint.h> #define SCR_VIDEOMEM 0xb8000 |
