Fixed printf and VGA driver bugs, also added README
This commit is contained in:
@@ -24,7 +24,7 @@ void move_cursor(uint16_t pos) {
|
||||
|
||||
void cursor_adv() {
|
||||
if(fb_col < VGA_WIDTH - 1)
|
||||
fb_col--;
|
||||
fb_col++;
|
||||
else
|
||||
newline();
|
||||
|
||||
@@ -70,7 +70,7 @@ void kprint(uint8_t *buf) {
|
||||
}
|
||||
|
||||
void init_prompt() {
|
||||
uint8_t *prompt = (uint8_t*)"\nuser@iceOS-$";
|
||||
uint8_t *prompt = (uint8_t*)"\nuser@iceOS-$ ";
|
||||
kprint_c(prompt, strlen(prompt), GREEN, BLACK);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,10 +40,10 @@ int printf(const char *format, ...) {
|
||||
kprint(s);
|
||||
break;
|
||||
default:
|
||||
kprint_c((uint8_t*)format+1, 1, WHITE, BLACK);
|
||||
kprint_c((uint8_t*)format+i, 1, WHITE, BLACK);
|
||||
}
|
||||
} else
|
||||
kprint_c((uint8_t*)format+1, 1, WHITE, BLACK);
|
||||
kprint_c((uint8_t*)format+i, 1, WHITE, BLACK);
|
||||
}
|
||||
va_end(ap);
|
||||
return 0;
|
||||
@@ -51,4 +51,4 @@ int printf(const char *format, ...) {
|
||||
|
||||
void puts(const char *buf) {
|
||||
printf("%s\n", buf);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user