version 1.1.1.1, 2008/06/03 10:38:45 |
version 1.1.1.1.2.1, 2008/08/13 17:12:30 |
|
|
#include <kernel.h> |
#include <kernel.h> |
#include <page.h> |
#include <page.h> |
#include <cpu.h> |
#include <cpu.h> |
|
#include <locore.h> |
|
|
#ifdef DEBUG |
#ifdef DEBUG |
#ifdef CONFIG_DIAG_SCREEN |
#ifdef CONFIG_DIAG_SCREEN |
|
|
{ |
{ |
int i; |
int i; |
|
|
memcpy(vram, vram + screen_x, screen_x * (screen_y - 1) * 2); |
memcpy(vram, vram + screen_x, (size_t)(screen_x * (screen_y - 1) * 2)); |
for (i = 0; i < screen_x; i++) |
for (i = 0; i < screen_x; i++) |
vram[screen_x * (screen_y - 1) + i] = ' '; |
vram[screen_x * (screen_y - 1) + i] = ' '; |
} |
} |
|
|
int pos = pos_y * screen_x + pos_x; |
int pos = pos_y * screen_x + pos_x; |
|
|
outb(0x0e, VID_PORT); |
outb(0x0e, VID_PORT); |
outb(pos >> 8, VID_PORT + 1); |
outb((u_int)pos >> 8, VID_PORT + 1); |
|
|
outb(0x0f, VID_PORT); |
outb(0x0f, VID_PORT); |
outb(pos & 0xff, VID_PORT + 1); |
outb((u_int)pos & 0xff, VID_PORT + 1); |
} |
} |
|
|
static void |
static void |
|
|
* Bochs debug port |
* Bochs debug port |
*/ |
*/ |
if (inb(0xe9) == 0xe9) |
if (inb(0xe9) == 0xe9) |
outb(c, 0xe9); |
outb((u_char)c, 0xe9); |
} |
} |
#endif /* CONFIG_DIAG_BOCHS */ |
#endif /* CONFIG_DIAG_BOCHS */ |
|
|