From 3676214a6288ccaacd8bb29c7ef02c51bb05ff5d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 23 Oct 2018 15:47:03 +0200 Subject: [PATCH] Remove remains of the old "panel" task. ...and grow the console by 1 row! :^) --- Kernel/Console.cpp | 4 ++-- Kernel/IPC.h | 1 - Kernel/Makefile | 1 - Kernel/VGA.cpp | 4 ++-- Kernel/panel.cpp | 47 ---------------------------------------------- 5 files changed, 4 insertions(+), 53 deletions(-) delete mode 100644 Kernel/panel.cpp diff --git a/Kernel/Console.cpp b/Kernel/Console.cpp index 86809ffe78..ecd10acffc 100644 --- a/Kernel/Console.cpp +++ b/Kernel/Console.cpp @@ -37,7 +37,7 @@ void Console::putChar(char ch) switch (ch) { case '\n': m_cursorColumn = 0; - if (m_cursorRow == (m_rows - 2)) { + if (m_cursorRow == (m_rows - 1)) { vga_scroll_up(); } else { ++m_cursorRow; @@ -50,7 +50,7 @@ void Console::putChar(char ch) ++m_cursorColumn; if (m_cursorColumn >= m_columns) { - if (m_cursorRow == (m_rows - 2)) { + if (m_cursorRow == (m_rows - 1)) { vga_scroll_up(); } else { ++m_cursorRow; diff --git a/Kernel/IPC.h b/Kernel/IPC.h index be595b7741..efb4514696 100644 --- a/Kernel/IPC.h +++ b/Kernel/IPC.h @@ -28,7 +28,6 @@ public: Handle(AnyHandle) : m_data(0xffffffff) { } enum KernelTask { - PanelTask = 4001, DiskTask = 4002, FileSystemTask = 4003, MotdTask = 4004, diff --git a/Kernel/Makefile b/Kernel/Makefile index 5929be1044..2465de2d84 100644 --- a/Kernel/Makefile +++ b/Kernel/Makefile @@ -14,7 +14,6 @@ KERNEL_OBJS = \ PIC.o \ Syscall.o \ DataBuffer.o \ - panel.o \ Disk.o \ Userspace.o \ IDEDiskDevice.o \ diff --git a/Kernel/VGA.cpp b/Kernel/VGA.cpp index 2180490ad7..782a730485 100644 --- a/Kernel/VGA.cpp +++ b/Kernel/VGA.cpp @@ -10,8 +10,8 @@ PRIVATE BYTE current_attr = 0x07; void vga_scroll_up() { - memcpy(vga_mem, vga_mem + 160, 160 * 23); - memset(vga_mem + (160 * 23), 0, 160); + memcpy(vga_mem, vga_mem + 160, 160 * 24); + memset(vga_mem + (160 * 24), 0, 160); } void vga_putch_at(byte row, byte column, byte ch) diff --git a/Kernel/panel.cpp b/Kernel/panel.cpp deleted file mode 100644 index 896b4f1a66..0000000000 --- a/Kernel/panel.cpp +++ /dev/null @@ -1,47 +0,0 @@ -#include "types.h" -#include "Task.h" -#include "VGA.h" -#include "system.h" -#include "i386.h" -#include "i8253.h" -#include "kmalloc.h" - -PUBLIC void panel_main() NORETURN; - -PUBLIC void -panel_main() -{ - WORD c; - BYTE a; - - for( ;; ) - { - continue; - /* HACK: Avoid getting interrupted while painting since - * that could lead to fugly artifacts ;P */ - cli(); - - c = vga_get_cursor(); - a = vga_get_attr(); - - vga_set_attr( 0x17 ); - vga_set_cursor( 80 * 24 ); - - kprintf( - " Uptime: %u -- %u tasks (%u blocked) kmalloc: %u/%u ", - system.uptime / TICKS_PER_SECOND, - system.nprocess, - system.nblocked, - sum_alloc, - sum_free - ); - - vga_set_attr( a ); - vga_set_cursor( c ); - - /* HACK cont.d */ - sti(); - - sleep( 1 * TICKS_PER_SECOND ); - } -}