Cleanup help menu
authorHugo Villeneuve <hugo@hugovil.com>
Mon, 10 Feb 2014 01:35:26 +0000 (20:35 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Thu, 13 Feb 2014 05:25:18 +0000 (00:25 -0500)
src/cli/menu.c
src/cli/scanner.l

index f4a12d6..a6d7765 100644 (file)
@@ -97,33 +97,32 @@ menu_get_input(char *buf, ssize_t size)
 void
 menu_display_usage(void)
 {
-       printf("      *******************\n"
-              "      *  8051 Emulator  *\n"
-              "      *******************\n"
+       printf("  " PACKAGE_NAME " commands, [] = options:\n"
               "\n"
-              "      Available commands, [ ] = options\n"
-              "\n"
-              "  Set Breakpoint.............. SB [address]\n"
-              "  Remove Breakpoint........... RB [address]\n"
-              "                                  address = all:"
-              " clear all breakpoints\n"
-              "  Display Breakpoint(s)....... DB\n"
-              "  Dump External Data Memory... DE [address] [size]\n"
-              "  Dump Internal Data Memory... DI [address] [size]\n"
-              "  Dump Program Memory......... DP [address] [size]\n"
-              "  Display Registers........... DR\n"
-              "  Help........................ H or ?\n"
-              "  Modify External Data Memory. ME address value\n"
-              "  Modify Internal Data Memory. MI address value\n"
-              "  Modify Program Memory....... MP address value\n"
-              "  Modify Register............. MR register value\n"
-              "  Quit........................ Q\n"
-              "  Run......................... R [number of instructions]\n"
-              "  Step........................ S\n"
-              "  Unassemble.................. U [address]"
-              " [number of instructions]\n"
-              "  Reset processor............. Z\n"
-              "  Reset general-purpose timer. ZT\n");
+              "  sb [ADDRESS]        Set breakpoint at PC or ADDRESS\n"
+              "  rb [ADDRESS]        Remove breakpoint at PC or ADDRESS\n"
+              "                        ADDRESS = all: clear all breakpoints\n"
+              "  db                  Display breakpoints\n"
+              "  de ADDRESS NUM      Dump NUM bytes from ADDRESS in external data"
+              " memory\n"
+              "  di ADDRESS NUM      Dump NUM bytes from ADDRESS in internal data"
+              " memory\n"
+              "  dp ADDRESS NUM      Dump NUM bytes from ADDRESS in program"
+              " memory\n"
+              "  dr                  Display registers\n"
+              "  h or ?              Display this help menu\n"
+              "  q                   Quit\n"
+              "  r [NUM]             Run until breakpoint or for NUM "
+              "instructions\n"
+              "  s                   Step (execute 1 instruction)\n"
+              "  u [ADDRESS] [NUM]   Unassemble NUM instructions at ADDRESS\n"
+              "  we ADDRESS VAL      Write VAL at ADDRESS in external data memory\n"
+              "  wi ADDRESS VAL      Write VAL at ADDRESS in internal data memory\n"
+              "  wp ADDRESS VAL      Write VAL at ADDRESS in program memory\n"
+              "  wr REGISTER VAL     Write VAL at REGISTER (REGISTER is name of"
+              " register)\n"
+              "  z                   Reset processor\n"
+              "  zt                  Reset emulator (not processor) timer\n");
 }
 
 /* Disassemble NumberInst instructions at Address */
@@ -277,8 +276,8 @@ console_dump_sfr_registers_compact(void)
        printf("---------------------------------------------------------------"
               "-------\n");
 
-       printf("| General-purpose Timer: %08d |\n", gp_timer_read());
-       printf("-----------------------------------\n");
+       printf("| Emulator timer: %08d |\n", gp_timer_read());
+       printf("----------------------------\n");
 }
 
 /* Show CPU registers */
index 4cdf42f..e88773f 100644 (file)
@@ -30,13 +30,13 @@ di          return TOK_DI;
 dp          return TOK_DP;
 dr          return TOK_DR;
 r           return TOK_RUN;
-me          return TOK_MOD_EXT;
-mi          return TOK_MOD_INT;
-mp          return TOK_MOD_PROG;
-mr          return TOK_MOD_REG;
 q           return TOK_QUIT;
 s           return TOK_STEP;
 u           return TOK_UNASM;
+we          return TOK_MOD_EXT;
+wi          return TOK_MOD_INT;
+wp          return TOK_MOD_PROG;
+wr          return TOK_MOD_REG;
 z           return TOK_RST;
 zt          return TOK_RST_TIMER;
 all         return TOK_ALL;