diff --git a/sys/include/video.h b/sys/include/video.h index 333ee4b..759d9c7 100644 --- a/sys/include/video.h +++ b/sys/include/video.h @@ -5,7 +5,7 @@ #define VGA_SIZE 4000 #define VGA_TEXT_SIZE 2000 -s32 unused = 0; +s16 unused = 0; s8 *vga_vidmem = (s8 *)0xb8000; s8 vga_unused = 0; diff --git a/sys/sysinit.c b/sys/sysinit.c index 07842e9..9771517 100644 --- a/sys/sysinit.c +++ b/sys/sysinit.c @@ -3,8 +3,46 @@ void sysinit(void) { - char *howdy = "Om Smart"; + char *howdy = "Om Smart."; + char *howday = "Om Smarter."; vga_clearscreen(); - vga_write(howdy, strlen(howdy), 0x1f); + /* + for (s16 i = 0; i < 100; i++) { + vga_write(howdy, strlen(howdy), 0x1f); + vga_write(howday, strlen(howday), 0x0f); + } + + vga_write("sid", 3, 0x07); + vga_write("did", 3, 0x07); + vga_write("fid", 3, 0x07); + */ + + vga_write( +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter." +"bob", 2003, 0x0F); } diff --git a/sys/video.c b/sys/video.c index 94d217a..a8def13 100644 --- a/sys/video.c +++ b/sys/video.c @@ -11,11 +11,11 @@ vga_write(s8 *sequence, s16 size, s8 flags) vga_vidmem[i] = sequence[using_size + i]; vga_vidmem[++i] = flags; } - unused = 4001; + unused = 4000; return; } - if (size * 2 + unused >= VGA_SIZE) { + if (size * 2 + unused > VGA_SIZE) { s16 needed_space = size * 2; for (s16 i = 0; i <= (unused = VGA_SIZE - needed_space); i++) {