Releasing debian version 6.03~pre1+dfsg-3.
[syslinux-debian/hramrach.git] / core / hello.c
blobbed7cb59c7468744869ccedf9c9316eed0075632
1 #include <stddef.h>
2 #include <com32.h>
3 #include <stdio.h>
4 #include <string.h>
6 #include "core.h"
8 #include <console.h>
10 void myputchar(int c)
12 if (c == '\n')
13 myputchar('\r');
15 writechr(c);
18 void myputs(const char *str)
20 while (*str)
21 myputchar(*str++);
24 void hello(void)
26 static char hello_str[] = "Hello, World!";
28 printf("%s from (%s)\n", hello_str, __FILE__); /* testing */
31 void hexdump(void *buf, int bytelen, const char *str)
33 unsigned int *p32, i;
35 if (str)
36 printf("Dump %s:\n", str);
38 p32 = (unsigned int *)buf;
39 for (i = 0; i < (bytelen / 4); i++){
40 printf(" 0x%08x ", p32[i]);
42 printf("\n\n");
45 static inline void myprint(int num)
47 uint32_t i;
49 for (i = 0; i < 5; i ++)
50 printf("%d", num);
51 printf("\n");
54 void mp1(void)
56 myprint(1);
59 void mp2(void)
61 myprint(2);
64 void mp3(void)
66 myprint(3);
69 void mp4(void)
71 myprint(4);
74 void mp5(void)
76 myprint(5);