Import backup from 2003-08-18
This commit is contained in:
parent
162e52b121
commit
b0c1c492b2
@ -28,8 +28,14 @@
|
||||
#define YELLOW_TXT 0x0E
|
||||
#define BRWHITE_TXT 0x0F
|
||||
|
||||
typedef unsigned char byte;
|
||||
typedef unsigned short word;
|
||||
typedef unsigned int dword;
|
||||
|
||||
#define UCHAR unsigned char
|
||||
#define USHORT unsigned short
|
||||
#define UINT unsigned int
|
||||
|
||||
|
||||
|
||||
|
||||
|
14
kernel.c
14
kernel.c
@ -45,7 +45,7 @@ typedef struct{
|
||||
UCHAR RsvdFieldPosition;
|
||||
UCHAR DirectColorModeInfo;
|
||||
|
||||
void *PhysBasePtr;
|
||||
dword PhysBasePtr;
|
||||
UINT OffScreenMemOffset;
|
||||
USHORT OffScreenMemSize;
|
||||
UCHAR Reserved[206];
|
||||
@ -66,16 +66,12 @@ void k_init()
|
||||
UINT *vid = (UINT *) (mib->PhysBasePtr);
|
||||
UINT a;
|
||||
UINT tot = ((mib->XResolution) * (mib->YResolution));
|
||||
word step = 0x1000000 / tot; //step to increase color by for each pixel
|
||||
dword color = 0;
|
||||
for (a = 0; a < tot; a++)
|
||||
{
|
||||
if (a < (tot / 4))
|
||||
vid[a] = 0x00FF0000;
|
||||
else if (a < (tot / 2))
|
||||
vid[a] = 0x0000FF00;
|
||||
else if (a < ((tot * 3) / 4))
|
||||
vid[a] = 0x000000FF;
|
||||
else
|
||||
vid[a] = 0x00FFFFFF;
|
||||
vid[a] = color;
|
||||
color += step;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user