62 lines
2.2 KiB
C
62 lines
2.2 KiB
C
#pragma once
|
|
|
|
#define PROMPT "> "
|
|
|
|
static const char *POOP =
|
|
" / ____/ / _ \\\n"
|
|
" _/ ___/_ / / \\___ \\_\n"
|
|
" / _/'-, `---._ / / \\_ \\\n"
|
|
" / ______/(0} `, , ` , ) / / \\_ \\\n"
|
|
" / V ; ` , ` ( / / ,'~~~~~~`, \\\n"
|
|
" | `.____,- ' (, ` , ) / / :`,-'\"\"`. \"; "
|
|
"|\n"
|
|
" | `-------._); , ` `, / / \\;: )``: |\n"
|
|
" / / ) ) ; ` ,, : / / `` : '; "
|
|
"\\\n"
|
|
"/ / ( (`;: ; ` ;:\\ / / ;;;, "
|
|
"\\\n"
|
|
"| / (: )``;:;;)`'`'`--./ / ____ _,-';;` "
|
|
"|\n"
|
|
"| | :` )`;)`)`' : / / ~~~~~ ~~~`--',.;;;| "
|
|
"|\n"
|
|
"| | `--;~~~~~ ` / /, \" \" \"` \",, \\ ;`` | "
|
|
" |\n"
|
|
"| | ( ; , / / ; `; ; | "
|
|
"|\n"
|
|
"| | (; ; ; ` / / ,` ` : | "
|
|
"><\n"
|
|
"| | (; / / / ` ; ; : |\n"
|
|
"| \\ ;(_; ; : / /` ; ; ,,,\"\"\";} `; / "
|
|
"><\n"
|
|
"\\ \\ : `; `; ` / /,;,'''' );;`); ; / >< "
|
|
" ><\n"
|
|
" \\ | ;' :; ;/ / (;` :( ; , ; | "
|
|
"><\n"
|
|
" | | |, `;; ,/ / `)`; `(; ` `; | "
|
|
"(`\\\n"
|
|
" | \\ ; ;; ``: / `).:` \\;, `. / _> "
|
|
")_\n"
|
|
" \\ \\_ ,-' ;`;;:;` / ;;'`;; `) )/ ,-' "
|
|
",-. `;\n"
|
|
" \\ \\_ ~~~,-`;`;,\" / ~~~~~ ,-' ; "
|
|
"`\"\"/ /\"\"\n"
|
|
" \\_ \\___\"\"\"/\"\" / `\"\"/\"\" "
|
|
"\n";
|
|
|
|
typedef enum {
|
|
HELP,
|
|
REBOOT,
|
|
POWEROFF,
|
|
HALT,
|
|
STACK,
|
|
ECHO,
|
|
COLOR,
|
|
MERDELLA,
|
|
ERROR
|
|
} CMD_TOK;
|
|
|
|
void reboot(void);
|
|
void halt(void);
|
|
void shell_init(void);
|
|
void print_stack(void);
|