2010-02-01 18:33:24 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS Boot Loader
|
|
|
|
* LICENSE: BSD - See COPYING.ARM in the top level directory
|
|
|
|
* FILE: boot/armllb/crtsupp.c
|
|
|
|
* PURPOSE: CRT Support Code
|
|
|
|
* PROGRAMMERS: ReactOS Portable Systems Group
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "precomp.h"
|
|
|
|
|
|
|
|
int
|
|
|
|
putchar(int c)
|
|
|
|
{
|
2010-02-02 17:21:19 +00:00
|
|
|
/* Write to the screen */
|
2010-02-01 18:33:24 +00:00
|
|
|
LlbVideoPutChar(c);
|
2010-02-02 17:21:19 +00:00
|
|
|
|
|
|
|
/* For DEBUGGING ONLY */
|
|
|
|
LlbSerialPutChar(c);
|
2010-02-01 18:33:24 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
puts(const char* string)
|
|
|
|
{
|
|
|
|
while (*string) putchar(*string++);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int printf(const char *fmt, ...)
|
|
|
|
{
|
|
|
|
va_list args;
|
|
|
|
unsigned int i;
|
|
|
|
char printbuffer[1024];
|
|
|
|
|
2010-02-02 17:21:19 +00:00
|
|
|
va_start(args, fmt);
|
|
|
|
i = vsprintf(printbuffer, fmt, args);
|
|
|
|
va_end(args);
|
2010-02-01 18:33:24 +00:00
|
|
|
|
|
|
|
/* Print the string */
|
|
|
|
return puts(printbuffer);
|
|
|
|
}
|
|
|
|
|
2010-11-23 16:40:10 +00:00
|
|
|
ULONG
|
2010-02-03 01:19:26 +00:00
|
|
|
DbgPrint(const char *fmt, ...)
|
|
|
|
{
|
|
|
|
va_list args;
|
|
|
|
unsigned int i, j;
|
|
|
|
char Buffer[1024];
|
|
|
|
|
|
|
|
va_start(args, fmt);
|
|
|
|
i = vsprintf(Buffer, fmt, args);
|
|
|
|
va_end(args);
|
2021-09-13 01:33:14 +00:00
|
|
|
|
2010-02-03 01:19:26 +00:00
|
|
|
for (j = 0; j < i; j++) LlbSerialPutChar(Buffer[j]);
|
2010-11-23 16:40:10 +00:00
|
|
|
return 0;
|
2010-02-03 01:19:26 +00:00
|
|
|
}
|
|
|
|
|
2010-02-01 18:33:24 +00:00
|
|
|
/* EOF */
|