aboutsummaryrefslogtreecommitdiff
path: root/src/libc/stdio.c
blob: 6e0063b8a159b797bc27e3c39923bdf079070bd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "stdio.h"
#include "string.h"

extern VIDEO_STATE VS;

void print(char *str){
  int i=0;
  while(str[i]!='\0'){
    putchar(str[i]);
    i++;
  }
}

void printc(char* str,VIDEO_COLORS c){
  VIDEO_COLORS backup=VS.fg;
  VS.fg=c;
  print(str);
  VS.fg=backup;
}

void printi(int i){
    char str[12];
    itoa(i,str);
    print(str);
}