1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-01-13 15:18:09 +00:00
Gustavo Romero dee71e8f01 Enhance hello_world
This commit enhances hello_world.bin output by printing
a ASCII lightbulb, which turns out to be Microwatt's logo,
instead of simply a "Hello World" text message.

Signed-off-by: Gustavo Romero <gustavo.romero@protonmail.com>
2020-07-13 17:11:14 -03:00

31 lines
428 B
C

#include <stdint.h>
#include <stdbool.h>
#include "console.h"
static char mw_logo[] =
"\n"
" .oOOo. \n"
" .\" \". \n"
" ; .mw. ; Microwatt, it works.\n"
" . ' ' . \n"
" \\ || / \n"
" ;..; \n"
" ;..; \n"
" `ww' \n";
int main(void)
{
console_init();
puts(mw_logo);
while (1) {
unsigned char c = getchar();
putchar(c);
if (c == 13) // if CR send LF
putchar(10);
}
}