Shorten GPLv2 licence text in header of each source file
[emu8051.git] / src / cli / menu.c
index a6d7765..bc8a3fd 100644 (file)
@@ -4,19 +4,7 @@
  * Copyright (C) 1999 Jonathan St-AndrĂ©
  * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * This file is released under the GPLv2
  */
 
 #include "config.h"
@@ -97,6 +85,8 @@ menu_get_input(char *buf, ssize_t size)
 void
 menu_display_usage(void)
 {
+       int id;
+
        printf("  " PACKAGE_NAME " commands, [] = options:\n"
               "\n"
               "  sb [ADDRESS]        Set breakpoint at PC or ADDRESS\n"
@@ -122,7 +112,14 @@ menu_display_usage(void)
               "  wr REGISTER VAL     Write VAL at REGISTER (REGISTER is name of"
               " register)\n"
               "  z                   Reset processor\n"
-              "  zt                  Reset emulator (not processor) timer\n");
+              "  zt ID               Reset emulator timer ID (");
+
+       for (id = 0; id < GP_TIMERS_COUNT; id++) {
+               printf("%c", 'A' + id);
+               if (id < (GP_TIMERS_COUNT - 1))
+                       printf(", ");
+       }
+       printf(")\n");
 }
 
 /* Disassemble NumberInst instructions at Address */
@@ -240,6 +237,7 @@ console_dump_sfr_registers_detailed(void)
 static void
 console_dump_sfr_registers_compact(void)
 {
+       int id;
        unsigned char PSW = cpu8051_ReadD(_PSW_);
        int BankSelect = (PSW & 0x18);
 
@@ -276,8 +274,12 @@ console_dump_sfr_registers_compact(void)
        printf("---------------------------------------------------------------"
               "-------\n");
 
-       printf("| Emulator timer: %08d |\n", gp_timer_read());
-       printf("----------------------------\n");
+       for (id = 0; id < GP_TIMERS_COUNT; id++)
+               printf("| Emulator timer %c: %08d |\n", 'A' + id, gp_timer_read(id));
+
+       printf("------------------------------\n");
+
+
 }
 
 /* Show CPU registers */