revert 64 bit update and some other shit

This commit is contained in:
justuswolff
2026-02-28 13:51:04 +01:00
parent 115b4c88a1
commit 8d19f45da2
8 changed files with 160 additions and 80 deletions

25
src/kernel/stdlib.c Normal file
View File

@@ -0,0 +1,25 @@
#include "../headers/stdlib.h"
uint32_t strlen32(char* str) {
uint32_t i = 0;
while (*str++ != 0) {i++;}
return i;
}
void strrev32(char* str) {
int c, i, j;
for (i = 0, j = strlen32(str)-1; i < j; i++, j--) {
c = str[i];
str[i] = str[j];
str[j] = c;
}
}
uint8_t uitoa32(uint32_t x, char* str) {
uint8_t i=0;
while (x > 0) {
str[i++] = x%10+'0';
x /= 10;
}
str[i] = 0;
strrev32(str);
return i;
}