mirror of
https://github.com/cc65/cc65.git
synced 2024-09-29 17:56:21 +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)
|
static char InputHex (char* Prompt, unsigned* Val)
|
||||||
/* Prompt for a hexadecimal value */
|
/* Prompt for a hexadecimal value. Return 0 on failure. */
|
||||||
{
|
{
|
||||||
char Buf [5];
|
char Buf [5];
|
||||||
char* P;
|
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)
|
static void ErrorPrompt (char* Msg)
|
||||||
/* Display an error message and wait for a key */
|
/* 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)
|
static void BreakInRomError (void)
|
||||||
/* Print an error message if we cannot set a breakpoint */
|
/* Print an error message if we cannot set a breakpoint */
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user