diff options
author | Alexis211 <alexis211@gmail.com> | 2009-08-21 23:59:19 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-08-21 23:59:19 +0200 |
commit | 74e721676ddd5d996ccf2e1d35da57320f658609 (patch) | |
tree | b39d766c8e27a654c89c2435131e5eaf193125d8 /Source/Kernel/Devices | |
parent | ae803baa4e0ec584c7afd3f6d55f2e6b32010b46 (diff) | |
download | Melon-74e721676ddd5d996ccf2e1d35da57320f658609.tar.gz Melon-74e721676ddd5d996ccf2e1d35da57320f658609.zip |
Kernel now loads in higher half, and uses a VT for output.
Diffstat (limited to 'Source/Kernel/Devices')
-rw-r--r-- | Source/Kernel/Devices/Display/Display.proto.h | 2 | ||||
-rw-r--r-- | Source/Kernel/Devices/Display/VGATextOutput.class.cpp | 8 | ||||
-rw-r--r-- | Source/Kernel/Devices/Display/VGATextOutput.class.h | 2 | ||||
-rw-r--r-- | Source/Kernel/Devices/Display/VGATextOutput.class.o | bin | 1592 -> 0 bytes |
4 files changed, 7 insertions, 5 deletions
diff --git a/Source/Kernel/Devices/Display/Display.proto.h b/Source/Kernel/Devices/Display/Display.proto.h index 8e8e29d..d91023a 100644 --- a/Source/Kernel/Devices/Display/Display.proto.h +++ b/Source/Kernel/Devices/Display/Display.proto.h @@ -7,7 +7,7 @@ class Display { public: virtual u16int textCols() = 0; virtual u16int textRows() = 0; - virtual void putChar(u16int line, u16int col, char c, char color) = 0; //Color : <bg 4byte><fg 4byte> + virtual void putChar(u16int line, u16int col, char c, u8int color) = 0; //Color : <bg 4byte><fg 4byte> virtual void moveCursor(u16int line, u16int col) = 0; virtual void clear() = 0; }; diff --git a/Source/Kernel/Devices/Display/VGATextOutput.class.cpp b/Source/Kernel/Devices/Display/VGATextOutput.class.cpp index 66bffd5..28c943a 100644 --- a/Source/Kernel/Devices/Display/VGATextOutput.class.cpp +++ b/Source/Kernel/Devices/Display/VGATextOutput.class.cpp @@ -1,5 +1,7 @@ #include "VGATextOutput.class.h" +#define RAM_ADDR 0xC00B8000 + using namespace Sys; //For outb u16int VGATextOutput::textCols() { @@ -10,8 +12,8 @@ u16int VGATextOutput::textRows() { return 25; } -void VGATextOutput::putChar(u16int line, u16int col, char c, char color) { - u16int* where = (u16int*)0xB8000; +void VGATextOutput::putChar(u16int line, u16int col, char c, u8int color) { + u16int* where = (u16int*)RAM_ADDR; where[(80 * line) + col] = (color << 8) | c; } @@ -24,6 +26,6 @@ void VGATextOutput::moveCursor(u16int line, u16int col) { } void VGATextOutput::clear() { - u16int* where = (u16int*)0xB8000; + u16int* where = (u16int*)RAM_ADDR; for (int i = 0; i < 25 * 80; i++) where[i] = 0; } diff --git a/Source/Kernel/Devices/Display/VGATextOutput.class.h b/Source/Kernel/Devices/Display/VGATextOutput.class.h index 72ad604..a7968c7 100644 --- a/Source/Kernel/Devices/Display/VGATextOutput.class.h +++ b/Source/Kernel/Devices/Display/VGATextOutput.class.h @@ -7,7 +7,7 @@ class VGATextOutput : public Display { public: u16int textCols(); u16int textRows(); - void putChar(u16int line, u16int col, char c, char color); + void putChar(u16int line, u16int col, char c, u8int color); void moveCursor(u16int line, u16int col); void clear(); }; diff --git a/Source/Kernel/Devices/Display/VGATextOutput.class.o b/Source/Kernel/Devices/Display/VGATextOutput.class.o Binary files differdeleted file mode 100644 index ccd63a1..0000000 --- a/Source/Kernel/Devices/Display/VGATextOutput.class.o +++ /dev/null |