mirror of
https://github.com/cc65/cc65.git
synced 2024-12-27 00:29:31 +00:00
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:
parent
5e8ab3819d
commit
54f96dce9b
@ -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 */
|
||||
#define OPC_BRK 0x00
|
||||
#define OPC_BPL 0x10
|
||||
@ -186,12 +158,12 @@ static TextDesc RegText [] = {
|
||||
{ 1, 7, "HI" }
|
||||
};
|
||||
static TextDesc HelpText [] = {
|
||||
{ 1, 0, "F1 Help" },
|
||||
{ 1, 1, "F2 Toggle breakpoint" },
|
||||
{ 1, 2, "F3 Run until subroutine returns" },
|
||||
{ 1, 3, "F4 Run to cursor" },
|
||||
{ 1, 4, "F7 Step into" },
|
||||
{ 1, 5, "F8 Step over" },
|
||||
{ 1, 0, "F1, ? Help" },
|
||||
{ 1, 1, "F2, t Toggle breakpoint" },
|
||||
{ 1, 2, "F3, u Run until subroutine returns" },
|
||||
{ 1, 3, "F4, h Run to cursor" },
|
||||
{ 1, 4, "F7, space Step into" },
|
||||
{ 1, 5, "F8, enter Step over" },
|
||||
{ 1, 6, "1-5 Select active window" },
|
||||
{ 1, 7, "+ Page down" },
|
||||
{ 1, 8, "- Page up" },
|
||||
@ -200,8 +172,8 @@ static TextDesc HelpText [] = {
|
||||
{ 1, 11, "f Follow instruction" },
|
||||
{ 1, 12, "o Goto origin" },
|
||||
{ 1, 13, "p Use as new PC value" },
|
||||
{ 1, 14, "r Redraw screen" },
|
||||
{ 1, 15, "q Quit" },
|
||||
{ 1, 14, "q Quit" },
|
||||
{ 1, 15, "r Redraw screen" },
|
||||
{ 1, 16, "s Skip next instruction" },
|
||||
};
|
||||
|
||||
@ -866,7 +838,10 @@ static char AsmHandler (void)
|
||||
AsmAddr = AsmBack (AsmAddr, AsmFrame.fd_height);
|
||||
break;
|
||||
|
||||
case 't':
|
||||
#ifdef CH_F2
|
||||
case CH_F2:
|
||||
#endif
|
||||
DbgToggleUserBreak (AsmAddr);
|
||||
break;
|
||||
|
||||
@ -1446,17 +1421,26 @@ void DbgEntry (void)
|
||||
ActivateFrame (c - '1', 0);
|
||||
break;
|
||||
|
||||
case '?':
|
||||
#ifdef CH_F1
|
||||
case CH_F1:
|
||||
#endif
|
||||
HelpHandler ();
|
||||
break;
|
||||
|
||||
case 'u':
|
||||
#ifdef CH_F3
|
||||
case CH_F3:
|
||||
#endif
|
||||
/* Go until return */
|
||||
SetRTSBreak ();
|
||||
done = 1;
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
#ifdef CH_F4
|
||||
case CH_F4:
|
||||
#endif
|
||||
/* Go to cursor, only possible if cursor not at current PC */
|
||||
if (AsmAddr != brk_pc) {
|
||||
DbgSetTmpBreak (AsmAddr);
|
||||
@ -1465,10 +1449,21 @@ void DbgEntry (void)
|
||||
break;
|
||||
|
||||
case ' ':
|
||||
case '\n':
|
||||
#ifdef CH_F7
|
||||
case CH_F7:
|
||||
#endif
|
||||
SingleStep (1);
|
||||
if (DbgTmpBreaksOk ()) {
|
||||
/* Could set breakpoints */
|
||||
done = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case '\n':
|
||||
#ifdef CH_F8
|
||||
case CH_F8:
|
||||
SingleStep (c == CH_F7 || c == ' ');
|
||||
#endif
|
||||
SingleStep (0);
|
||||
if (DbgTmpBreaksOk ()) {
|
||||
/* Could set breakpoints */
|
||||
done = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user