1*c2c66affSColin Finck /*
2*c2c66affSColin Finck * PROJECT: ReactOS Boot Loader
3*c2c66affSColin Finck * LICENSE: BSD - See COPYING.ARM in the top level directory
4*c2c66affSColin Finck * FILE: boot/armllb/crtsupp.c
5*c2c66affSColin Finck * PURPOSE: CRT Support Code
6*c2c66affSColin Finck * PROGRAMMERS: ReactOS Portable Systems Group
7*c2c66affSColin Finck */
8*c2c66affSColin Finck
9*c2c66affSColin Finck #include "precomp.h"
10*c2c66affSColin Finck
11*c2c66affSColin Finck int
putchar(int c)12*c2c66affSColin Finck putchar(int c)
13*c2c66affSColin Finck {
14*c2c66affSColin Finck /* Write to the screen */
15*c2c66affSColin Finck LlbVideoPutChar(c);
16*c2c66affSColin Finck
17*c2c66affSColin Finck /* For DEBUGGING ONLY */
18*c2c66affSColin Finck LlbSerialPutChar(c);
19*c2c66affSColin Finck return 0;
20*c2c66affSColin Finck }
21*c2c66affSColin Finck
22*c2c66affSColin Finck int
puts(const char * string)23*c2c66affSColin Finck puts(const char* string)
24*c2c66affSColin Finck {
25*c2c66affSColin Finck while (*string) putchar(*string++);
26*c2c66affSColin Finck return 0;
27*c2c66affSColin Finck }
28*c2c66affSColin Finck
printf(const char * fmt,...)29*c2c66affSColin Finck int printf(const char *fmt, ...)
30*c2c66affSColin Finck {
31*c2c66affSColin Finck va_list args;
32*c2c66affSColin Finck unsigned int i;
33*c2c66affSColin Finck char printbuffer[1024];
34*c2c66affSColin Finck
35*c2c66affSColin Finck va_start(args, fmt);
36*c2c66affSColin Finck i = vsprintf(printbuffer, fmt, args);
37*c2c66affSColin Finck va_end(args);
38*c2c66affSColin Finck
39*c2c66affSColin Finck /* Print the string */
40*c2c66affSColin Finck return puts(printbuffer);
41*c2c66affSColin Finck }
42*c2c66affSColin Finck
43*c2c66affSColin Finck ULONG
DbgPrint(const char * fmt,...)44*c2c66affSColin Finck DbgPrint(const char *fmt, ...)
45*c2c66affSColin Finck {
46*c2c66affSColin Finck va_list args;
47*c2c66affSColin Finck unsigned int i, j;
48*c2c66affSColin Finck char Buffer[1024];
49*c2c66affSColin Finck
50*c2c66affSColin Finck va_start(args, fmt);
51*c2c66affSColin Finck i = vsprintf(Buffer, fmt, args);
52*c2c66affSColin Finck va_end(args);
53*c2c66affSColin Finck
54*c2c66affSColin Finck for (j = 0; j < i; j++) LlbSerialPutChar(Buffer[j]);
55*c2c66affSColin Finck return 0;
56*c2c66affSColin Finck }
57*c2c66affSColin Finck
58*c2c66affSColin Finck /* EOF */
59