From 0e697a27ae3f56557bdccf48c20230ad61d62e73 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Wed, 23 Jan 2019 23:31:51 -0800 Subject: [PATCH 1/3] memcmp added to stdlib module --- stl/stdlib.c | 8 ++++++++ stl/stdlib.h | 1 + 2 files changed, 9 insertions(+) create mode 100644 stl/stdlib.c create mode 100644 stl/stdlib.h diff --git a/stl/stdlib.c b/stl/stdlib.c new file mode 100644 index 0000000..0c96a34 --- /dev/null +++ b/stl/stdlib.c @@ -0,0 +1,8 @@ +int memcmp(const void* left, const void* right, const unsigned length) { + for(unsigned i=0;i Date: Mon, 18 Feb 2019 15:06:20 -0800 Subject: [PATCH 2/3] basically useless commit --- stl/string.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stl/string.h b/stl/string.h index dbbeab9..831ca84 100644 --- a/stl/string.h +++ b/stl/string.h @@ -1,4 +1,7 @@ -// our own stuff for stl utilities +/* + * string.h + * String based utilities +*/ unsigned strlen(const char* str) { unsigned idx = 0; From 8d1879fe97ffabcdb90d476503f1189ef7934267 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Mon, 25 Feb 2019 15:36:31 -0800 Subject: [PATCH 3/3] - Retesting framebuffer drivers - clear_fb() fully working - trying to add positional buffer writes for fancy output - POSITION macro only seems to work for (0,0) coords for now haven't tested other edge cases yet --- framebuffer.c | 25 +++++++++++++++++-------- framebuffer.h | 9 ++++++--- loader.asm | 5 ++--- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/framebuffer.c b/framebuffer.c index 8bca41e..8e2c2b7 100644 --- a/framebuffer.c +++ b/framebuffer.c @@ -9,27 +9,36 @@ static char* Frame_Buffer = (char*)FRAME_BUFFER_ADDR; static char* Frame_Buffer_End = (char*)(FRAME_BUFFER_ADDR + AREA); + // Writes character to a given cell in the framebuffer // @cell parameter is the logical (linear)index into the buffer // _not_ the actual offset from the buffer addr // also proper location is caller's responsibility -void writech_fb(unsigned cell, char c, char fg, char bg) { +void write_cell_fb(unsigned cell, char c, char fg, char bg) { Frame_Buffer[cell] = c; Frame_Buffer[cell+1] = (fg & 0x0f << 4) | (bg & 0x0f); } /* this probably doesn't belong here */ -void print_fb(char* str) { - for(unsigned i =0;i