ri: add some help text on startup

FossilOrigin-Name: 6c8e5c3a3656835f8d727bab7aae5149baaa35b89fea82f7cf64b331ec97e321
This commit is contained in:
crc 2018-01-13 19:34:55 +00:00
parent f9543e1139
commit d15ca7c96e

View file

@ -381,6 +381,29 @@ void setup_interface() {
doupdate();
}
/*---------------------------------------------------------------------
Display some help on startup
---------------------------------------------------------------------*/
void start_screen() {
wprintw(output, "Welcome to RETRO\n");
wprintw(output, "\n");
wprintw(output, "Input appears on the bottom left.\n");
wprintw(output, "The stack appears on the bottom right.\n");
wprintw(output, "Output appears here.\n");
wprintw(output, "\n");
wprintw(output, "TAB to clear output.\n");
wprintw(output, "CTRL+D to exit.\n");
wprintw(output, "SPACE to run input.\n");
wprintw(output, "\n");
wrefresh(output);
dump_stack();
wrefresh(stack);
doupdate();
}
#ifndef CTRL
#define CTRL(c) ((c) & 037)
#endif
@ -401,6 +424,7 @@ int main() {
update_rx();
setup_interface();
start_screen();
while ((ch = wgetch(input)) != CTRL('d')) {
switch (ch) {