initial razzle

This commit is contained in:
Nicholas Orlowsky 2024-10-03 02:55:54 -05:00
commit cd3d8871df
29 changed files with 1986 additions and 0 deletions

24
kernel/memory.c Normal file
View file

@ -0,0 +1,24 @@
#pragma once
#include <stdint.h>
void memset(char *ptr, char data, uint32_t len) {
for (uint32_t i = 0; i < len; i++) {
ptr[i] = data;
}
}
void memcpy(char *src, char *dst, uint32_t size) {
for (uint32_t i = 0; i < size; i++) {
dst[i] = src[i];
}
}
void strncpy(char *src, char *dst, uint32_t size) {
for (uint32_t i = 0; i < size; i++) {
dst[i] = src[i];
if (src[i] == '\0') {
return;
}
}
}