X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=src%2Femuconsole.c;h=e31d1b3cee6de19fb3b944d939e45a5a9ac9bdfd;hb=fc3c2b3dbd1b840445dc5bd9f2d3e99ac68837e6;hp=8073c56648af28fd9cd9954989f42bfb6fae6520;hpb=fb3b3529579773b8a14959cc6bc5bb2096fd0fe8;p=emu8051.git diff --git a/src/emuconsole.c b/src/emuconsole.c index 8073c56..e31d1b3 100644 --- a/src/emuconsole.c +++ b/src/emuconsole.c @@ -33,13 +33,6 @@ #include "hexfile.h" #include "keyboard.h" -/* Maximum number of BreakPoints */ -#define MAXBP 32 - -static int RunningState; -static int NbBreakpoints; -static unsigned int Breakpoints[MAXBP]; - /* Capitalize all letters in buffer */ static void Capitalize(char *buffer) @@ -63,50 +56,6 @@ RemoveSpaces(char *buffer) strcpy(buffer, &buffer[k]); } -/* Is the a breakpoint at Address */ -static int -IsBreakpoint(unsigned int Address) -{ - int Index = 0; - while (Index < NbBreakpoints && (Breakpoints[Index] != Address)) - Index++; - - return ((Breakpoints[Index] == Address) && (Index < NbBreakpoints)); -} - -/* Show Breakpoints list */ -static void -ShowBreakpoints(void) -{ - int Index; - - for (Index = 0; Index < NbBreakpoints ; Index++) - printf("Breakpoint at Address = %.4X\n", Breakpoints[Index]); -} - -/* Clear Breakpoint at Address from list */ -static void -ClearBreakpoint(unsigned int Address) -{ - int Index = 0; - while ((Index < NbBreakpoints) && (Breakpoints[Index] != Address)) - Index++; - if (Breakpoints[Index] != Address) - return; - Breakpoints[Index] = Breakpoints[NbBreakpoints - 1]; - NbBreakpoints--; -} - -/* Set Breakpoint at Address from list */ -static void -SetBreakpoint(unsigned int Address) -{ - if (IsBreakpoint(Address)) - return; - if (NbBreakpoints < MAXBP) - Breakpoints[NbBreakpoints++] = Address; -} - /* CPU exec and Console UI update */ static void console_exec(char *Address, char *NumberInst) @@ -375,10 +324,10 @@ console_main(void) } switch (Command[0]) { - case 'D': + case 'D': if (strlen(Parameter2) == 0) { char buf[1024]; - + if (STREQ(Command, "DB") && (strlen(Parameter1) == 0)) ShowBreakpoints(); @@ -518,9 +467,6 @@ main(int argc, char **argv) cpu8051_init(); - RunningState = 0; - NbBreakpoints = 0; - hex_file = get_hex_filename(); if (hex_file != NULL)