-static int InputHex (char* Prompt, unsigned* Val)
-/* Prompt for a hexadecimal value */
+static char InputHex (char* Prompt, unsigned* Val)
+/* Prompt for a hexadecimal value. Return 0 on failure. */
{
char Buf [5];
char* P;
-static int InputGoto (unsigned* Addr)
-/* Prompt "Goto" and read an address */
-{
- return InputHex ("Goto: ", Addr);
-}
-
-
-
static void ErrorPrompt (char* Msg)
/* Display an error message and wait for a key */
{
+static char InputGoto (unsigned* Addr)
+/* Prompt "Goto" and read an address. Print an error and return 0 on failure. */
+{
+ char Ok;
+ Ok = InputHex ("Goto: ", Addr);
+ if (!Ok) {
+ ErrorPrompt ("Invalid input - press a key");
+ }
+ return Ok;
+}
+
+
+
static void BreakInRomError (void)
/* Print an error message if we cannot set a breakpoint */
{