moved drivers to root level directory for now and created some basic test module
This commit is contained in:
parent
92c5b32b12
commit
e6a5966fe6
@ -12,3 +12,6 @@ int memcmp(const void* left, const void* right, const size_t size) {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void* memalloc(const size_t size) {
|
||||
}
|
||||
|
@ -1,5 +1,11 @@
|
||||
struct MemSpace {
|
||||
size_t size;
|
||||
void* buffer;
|
||||
};
|
||||
/* Returns 0: if both memory buffers are the same
|
||||
* Return !0: if the memory buffers are not the same
|
||||
*
|
||||
*/
|
||||
int memcmp(const void* left, const void* right, const size_t size);
|
||||
|
||||
void* memalloc(const size_t);
|
||||
|
2
stl/stlio.h
Normal file
2
stl/stlio.h
Normal file
@ -0,0 +1,2 @@
|
||||
// General input/output reharding stdio + file io
|
||||
|
10
stlio.c
Normal file
10
stlio.c
Normal file
@ -0,0 +1,10 @@
|
||||
#include "stlio.h"
|
||||
|
||||
u64 write(const s8* buffer, const u64 size) {
|
||||
s32 offset = Frame_Buffer_Cursor;
|
||||
u64 i;
|
||||
for(i = 0; i < size; i++) {
|
||||
write_cell_fb((u64)offset + i, buffer[i], Green, White);
|
||||
}
|
||||
return i;
|
||||
}
|
5
stlio.h
Normal file
5
stlio.h
Normal file
@ -0,0 +1,5 @@
|
||||
#include "types.h"
|
||||
#include "framebuffer.h"
|
||||
// Frame buffer driver
|
||||
|
||||
u64 write(const s8*, const u64);
|
8
tests.c
Normal file
8
tests.c
Normal file
@ -0,0 +1,8 @@
|
||||
// Module for testing drivers and other things
|
||||
#include "tests.h"
|
||||
|
||||
void test_write() {
|
||||
clear_fb();
|
||||
s8* msg1 = (s8*)"big yeet";
|
||||
write(msg1, sizeof(msg1));
|
||||
}
|
Loading…
Reference in New Issue
Block a user