git-svn-id: https://spexeah.com:8443/svn/Asuro@527 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
1 parent
2feff08097
commit
b626d8c207
65 files changed
+193
-65
No files matched your search
+30
-1
@@ -15,7 +15,8 @@ uses
|
||||
util,
|
||||
bios_data_area,
|
||||
multiboot,
|
||||
fonts;
|
||||
fonts,
|
||||
tracer;
|
||||
|
||||
type
|
||||
TColor = ( Black = $0,
|
||||
@@ -96,6 +97,8 @@ procedure _safeincrement_x();
|
||||
procedure _newline();
|
||||
|
||||
procedure outputChar(c : char; x : uint8; y : uint8; fgcolor : uint16; bgcolor : uint16);
|
||||
function getPixel(x : uint32; y : uint32) : uint16;
|
||||
procedure drawPixel(x : uint32; y : uint32; color : uint16);
|
||||
|
||||
implementation
|
||||
|
||||
@@ -131,6 +134,32 @@ var
|
||||
Console_Cursor : TCoord;
|
||||
Ready : Boolean = false;
|
||||
|
||||
function getPixel(x : uint32; y : uint32) : uint16;
|
||||
var
|
||||
dest : puint16;
|
||||
|
||||
begin
|
||||
//push_trace('console.getPixel');
|
||||
if not ready then exit;
|
||||
dest:= puint16(multibootinfo^.framebuffer_addr);
|
||||
dest:= dest + (y * 1280) + x;
|
||||
getPixel:= dest^;
|
||||
//pop_trace;
|
||||
end;
|
||||
|
||||
procedure drawPixel(x : uint32; y : uint32; color : uint16);
|
||||
var
|
||||
dest : puint16;
|
||||
|
||||
begin
|
||||
//push_trace('console.drawPixel');
|
||||
if not ready then exit;
|
||||
dest:= puint16(multibootinfo^.framebuffer_addr);
|
||||
dest:= dest + (y * 1280) + x;
|
||||
dest^:= color;
|
||||
//pop_trace;
|
||||
end;
|
||||
|
||||
procedure outputChar(c : char; x : uint8; y : uint8; fgcolor : uint16; bgcolor : uint16);
|
||||
var
|
||||
dest : puint16;
|
||||
|
||||
+160
-64
File diff suppressed because it is too large.
Load diff
@@ -101,6 +101,8 @@ begin
|
||||
outb($71, prev OR $40);
|
||||
STI;
|
||||
outb($70, $00);
|
||||
inb($71);
|
||||
|
||||
isrmanager.registerISR(32 + 8, @update);
|
||||
//TMR_0_ISR.hook(uint32(@update));
|
||||
end;
|
||||
|
||||
@@ -195,6 +195,7 @@ end;
|
||||
|
||||
procedure help(params : PParamList);
|
||||
var
|
||||
|
||||
i : uint32;
|
||||
begin
|
||||
console.writestringln('Registered Commands: ');
|
||||
|
||||
Reference in new issue
Block a user