mirror of
https://github.com/cc65/cc65.git
synced 2025-02-28 20:29:46 +00:00
Output an error if an invalid address is used
git-svn-id: svn://svn.cc65.org/cc65/trunk@1452 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
3c31d063f7
commit
9ca21c07e0
@ -522,8 +522,8 @@ static char Input (char* Prompt, char* Buf, unsigned char Count)
|
||||
|
||||
|
||||
|
||||
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;
|
||||
@ -563,14 +563,6 @@ static int InputHex (char* Prompt, unsigned* Val)
|
||||
|
||||
|
||||
|
||||
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 */
|
||||
{
|
||||
@ -589,6 +581,19 @@ static void ErrorPrompt (char* Msg)
|
||||
|
||||
|
||||
|
||||
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 */
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user