- Fix bugs.
[reactos.git] / reactos / boot / armllb / crtsupp.c
1 /*
2 * PROJECT: ReactOS Boot Loader
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: boot/armllb/crtsupp.c
5 * PURPOSE: CRT Support Code
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9 #include "precomp.h"
10
11 int
12 putchar(int c)
13 {
14 /* Write to the serial port */
15 LlbSerialPutChar(c);
16
17 /* Write to the screen too */
18 LlbVideoPutChar(c);
19 return 0;
20 }
21
22 int
23 puts(const char* string)
24 {
25 while (*string) putchar(*string++);
26 return 0;
27 }
28
29 int printf(const char *fmt, ...)
30 {
31 va_list args;
32 unsigned int i;
33 char printbuffer[1024];
34
35 va_start (args, fmt);
36
37 /* For this to work, printbuffer must be larger than
38 * anything we ever want to print.
39 */
40 i = vsprintf (printbuffer, fmt, args);
41 va_end (args);
42
43 /* Print the string */
44 return puts(printbuffer);
45 }
46
47 /* EOF */