Add: graphics mode terminal scrolling

This commit is contained in:
xamidev
2024-08-23 13:05:53 +02:00
parent f8eb658c33
commit f1a9f84f24
8 changed files with 86 additions and 33 deletions

View File

@@ -77,9 +77,9 @@ serial_printf(3, "Framebuffer BPP: %u\r\n", fb_info->framebuffer_bpp);
uint32_t pitch = fb_info->framebuffer_pitch;
uint32_t bpp = fb_info->framebuffer_bpp;
//8x16 font padded with 1 for each char = 9px/char
VGA_WIDTH = width/9;
VGA_HEIGHT = height/9;
//8x16 font, not padded
VGA_WIDTH = width/8;
VGA_HEIGHT = height/16;
scanline = width * (bpp/8);
@@ -114,6 +114,11 @@ serial_printf(3, "Framebuffer BPP: %u\r\n", fb_info->framebuffer_bpp);
}
*/
for (int i=0; i<100; i++)
{
printf("%d\n", i);
}
//colorputs("Wow, such colorful output!", green, blue);
colorputs(ascii_title, green, black);

View File

@@ -8,6 +8,27 @@ void *memset(void *dest, char val, size_t count)
return dest;
}
void *memmove(void* dest, const void* src, size_t n)
{
unsigned char* d = (unsigned char*)dest;
const unsigned char* s = (const unsigned char*)src;
if (d < s)
{
for (size_t i=0; i<n; i++)
{
d[i] = s[i];
}
} else {
for (size_t i=n; i>0; i--)
{
d[i-1] = s[i-1];
}
}
return dest;
}
void panic()
{
for (;;);

View File

@@ -6,6 +6,7 @@
typedef int size_t;
void *memset(void *dest, char val, size_t count);
void *memmove(void* dest, const void* src, size_t n);
struct regs
{