Removed duplicate case labels and fixed the code for machines without some
or all function keys. git-svn-id: svn://svn.cc65.org/cc65/trunk@1027 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -97,34 +97,6 @@ static char GetKeyUpdate (void);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Key definitions */
|
|
||||||
#ifndef CH_F1
|
|
||||||
# define CH_F1 '?'
|
|
||||||
#endif
|
|
||||||
#ifndef CH_F2
|
|
||||||
# define CH_F2 0
|
|
||||||
#endif
|
|
||||||
#ifndef CH_F3
|
|
||||||
# define CH_F3 0
|
|
||||||
#endif
|
|
||||||
#ifndef CH_F4
|
|
||||||
# define CH_F4 0
|
|
||||||
#endif
|
|
||||||
#ifndef CH_F5
|
|
||||||
# define CH_F5 0
|
|
||||||
#endif
|
|
||||||
#ifndef CH_F6
|
|
||||||
# define CH_F6 0
|
|
||||||
#endif
|
|
||||||
#ifndef CH_F7
|
|
||||||
# define CH_F7 0
|
|
||||||
#endif
|
|
||||||
#ifndef CH_F8
|
|
||||||
# define CH_F8 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Defines for opcodes */
|
/* Defines for opcodes */
|
||||||
#define OPC_BRK 0x00
|
#define OPC_BRK 0x00
|
||||||
#define OPC_BPL 0x10
|
#define OPC_BPL 0x10
|
||||||
@@ -186,12 +158,12 @@ static TextDesc RegText [] = {
|
|||||||
{ 1, 7, "HI" }
|
{ 1, 7, "HI" }
|
||||||
};
|
};
|
||||||
static TextDesc HelpText [] = {
|
static TextDesc HelpText [] = {
|
||||||
{ 1, 0, "F1 Help" },
|
{ 1, 0, "F1, ? Help" },
|
||||||
{ 1, 1, "F2 Toggle breakpoint" },
|
{ 1, 1, "F2, t Toggle breakpoint" },
|
||||||
{ 1, 2, "F3 Run until subroutine returns" },
|
{ 1, 2, "F3, u Run until subroutine returns" },
|
||||||
{ 1, 3, "F4 Run to cursor" },
|
{ 1, 3, "F4, h Run to cursor" },
|
||||||
{ 1, 4, "F7 Step into" },
|
{ 1, 4, "F7, space Step into" },
|
||||||
{ 1, 5, "F8 Step over" },
|
{ 1, 5, "F8, enter Step over" },
|
||||||
{ 1, 6, "1-5 Select active window" },
|
{ 1, 6, "1-5 Select active window" },
|
||||||
{ 1, 7, "+ Page down" },
|
{ 1, 7, "+ Page down" },
|
||||||
{ 1, 8, "- Page up" },
|
{ 1, 8, "- Page up" },
|
||||||
@@ -200,8 +172,8 @@ static TextDesc HelpText [] = {
|
|||||||
{ 1, 11, "f Follow instruction" },
|
{ 1, 11, "f Follow instruction" },
|
||||||
{ 1, 12, "o Goto origin" },
|
{ 1, 12, "o Goto origin" },
|
||||||
{ 1, 13, "p Use as new PC value" },
|
{ 1, 13, "p Use as new PC value" },
|
||||||
{ 1, 14, "r Redraw screen" },
|
{ 1, 14, "q Quit" },
|
||||||
{ 1, 15, "q Quit" },
|
{ 1, 15, "r Redraw screen" },
|
||||||
{ 1, 16, "s Skip next instruction" },
|
{ 1, 16, "s Skip next instruction" },
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -866,7 +838,10 @@ static char AsmHandler (void)
|
|||||||
AsmAddr = AsmBack (AsmAddr, AsmFrame.fd_height);
|
AsmAddr = AsmBack (AsmAddr, AsmFrame.fd_height);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 't':
|
||||||
|
#ifdef CH_F2
|
||||||
case CH_F2:
|
case CH_F2:
|
||||||
|
#endif
|
||||||
DbgToggleUserBreak (AsmAddr);
|
DbgToggleUserBreak (AsmAddr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1446,17 +1421,26 @@ void DbgEntry (void)
|
|||||||
ActivateFrame (c - '1', 0);
|
ActivateFrame (c - '1', 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case '?':
|
||||||
|
#ifdef CH_F1
|
||||||
case CH_F1:
|
case CH_F1:
|
||||||
|
#endif
|
||||||
HelpHandler ();
|
HelpHandler ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'u':
|
||||||
|
#ifdef CH_F3
|
||||||
case CH_F3:
|
case CH_F3:
|
||||||
|
#endif
|
||||||
/* Go until return */
|
/* Go until return */
|
||||||
SetRTSBreak ();
|
SetRTSBreak ();
|
||||||
done = 1;
|
done = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'h':
|
||||||
|
#ifdef CH_F4
|
||||||
case CH_F4:
|
case CH_F4:
|
||||||
|
#endif
|
||||||
/* Go to cursor, only possible if cursor not at current PC */
|
/* Go to cursor, only possible if cursor not at current PC */
|
||||||
if (AsmAddr != brk_pc) {
|
if (AsmAddr != brk_pc) {
|
||||||
DbgSetTmpBreak (AsmAddr);
|
DbgSetTmpBreak (AsmAddr);
|
||||||
@@ -1465,10 +1449,21 @@ void DbgEntry (void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ' ':
|
case ' ':
|
||||||
case '\n':
|
#ifdef CH_F7
|
||||||
case CH_F7:
|
case CH_F7:
|
||||||
|
#endif
|
||||||
|
SingleStep (1);
|
||||||
|
if (DbgTmpBreaksOk ()) {
|
||||||
|
/* Could set breakpoints */
|
||||||
|
done = 1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '\n':
|
||||||
|
#ifdef CH_F8
|
||||||
case CH_F8:
|
case CH_F8:
|
||||||
SingleStep (c == CH_F7 || c == ' ');
|
#endif
|
||||||
|
SingleStep (0);
|
||||||
if (DbgTmpBreaksOk ()) {
|
if (DbgTmpBreaksOk ()) {
|
||||||
/* Could set breakpoints */
|
/* Could set breakpoints */
|
||||||
done = 1;
|
done = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user