PCI, Serial, Shell improvements (VGA is broken)

This commit is contained in:
Nicholas Orlowsky 2025-02-03 16:24:00 -05:00
parent 50f5723733
commit dac2cff511
14 changed files with 125490 additions and 64 deletions

View file

@ -3,12 +3,12 @@
#include <stdint.h>
// Below doesn't work!
//uint8_t streq(char *ptr, char* ptr2) {
// uint8_t streq(char *ptr, char* ptr2) {
// while (1 == 1) {
// if (*ptr != *ptr2) {
// return 0;
// }
//
//
// if (*ptr == '\0') {
// return 1;
// }
@ -20,13 +20,23 @@
uint8_t memseq(char *ptr, char *ptr2, uint32_t len) {
for (uint32_t i = 0; i < len; i++) {
if (ptr[i] != ptr2[i]) {
return 0;
}
if (ptr[i] != ptr2[i]) {
return 0;
}
}
return 1;
}
uint8_t streq(char *str, char *str2) {
for (uint32_t i = 0;; i++) {
if (str[i] != str2[i]) {
return 0;
} else if (str[i] == '\0' && str2[i] == '\0') {
return 1;
}
}
}
void memset(char *ptr, char data, uint32_t len) {
for (uint32_t i = 0; i < len; i++) {
ptr[i] = data;