Now this should be complete

Added basic shell and fixed various bugs...now iceos should be
"complete".
This commit is contained in:
ice-bit
2019-07-08 18:43:45 +02:00
parent 46e213e01c
commit 52bb2609ae
13 changed files with 243 additions and 64 deletions

View File

@@ -32,7 +32,7 @@ int printf(const char *format, ...) {
kprint(buf);
break;
case 'c':
s = va_arg(ap, uint8_t*);
c = (uint8_t)va_arg(ap, uint32_t);
kprint_c(&c, 1, WHITE, BLACK);
break;
case 's':
@@ -49,6 +49,11 @@ int printf(const char *format, ...) {
return 0;
}
int printf_color(const char *format, uint8_t fg, uint8_t bg) {
kprint_c((uint8_t*)format, strlen((uint8_t*)format), fg, bg);
return 0;
}
void puts(const char *buf) {
printf("%s\n", buf);
}

View File

@@ -14,6 +14,7 @@
#include <stdarg.h>
int printf(const char *format, ...);
int printf_color(const char *format, uint8_t fg, uint8_t bg); // Only for string for now
void puts(const char *buf);
#endif