You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "defs.h"
#include "gdbcore.h"
#include "monitor.h"
#include "serial.h"
-static void rom68k_open PARAMS ((char *, int));
+static void rom68k_open PARAMS ((char *args, int from_tty));
static void
rom68k_supply_register (regname, regnamelen, val, vallen)
regno = -1;
if (regnamelen == 2)
- {
- switch (regname[0])
- {
- case 'S':
- if (regname[1] == 'R')
- regno = PS_REGNUM;
+ switch (regname[0])
+ {
+ case 'S':
+ if (regname[1] == 'R')
+ regno = PS_REGNUM;
+ break;
+ case 'P':
+ if (regname[1] == 'C')
+ regno = PC_REGNUM;
+ break;
+ case 'D':
+ if (regname[1] != 'R')
break;
- case 'P':
- if (regname[1] == 'C')
- regno = PC_REGNUM;
+ regno = D0_REGNUM;
+ numregs = 8;
+ break;
+ case 'A':
+ if (regname[1] != 'R')
break;
- case 'D':
- if (regname[1] != 'R')
- break;
- regno = D0_REGNUM;
- numregs = 8;
- break;
- case 'A':
- if (regname[1] != 'R')
- break;
- regno = A0_REGNUM;
- numregs = 7;
- break;
- }
- }
+ regno = A0_REGNUM;
+ numregs = 7;
+ break;
+ }
else if (regnamelen == 3)
- {
- switch (regname[0])
- {
- case 'I':
- if (regname[1] == 'S' && regname[2] == 'P')
- regno = SP_REGNUM;
- }
- }
+ switch (regname[0])
+ {
+ case 'I':
+ if (regname[1] == 'S' && regname[2] == 'P')
+ regno = SP_REGNUM;
+ }
if (regno >= 0)
while (numregs-- > 0)
static struct target_ops rom68k_ops;
-static char *rom68k_loadtypes[] = {"srec", NULL};
-static char *rom68k_loadprotos[] = {"none", NULL};
-
static char *rom68k_inits[] = {".\r\r", NULL}; /* Exits pm/pr & download cmds */
static struct monitor_ops rom68k_cmds =
/* register_pattern */
"\\(\\w+\\)=\\([0-9a-fA-F]+\\( +[0-9a-fA-F]+\\b\\)*\\)",
rom68k_supply_register, /* supply_register */
+ NULL, /* load_routine (defaults to SRECs) */
"dc\r", /* download command */
"Waiting for S-records from host... ", /* Load response */
- "ROM68K :->", /* monitor command prompt */
- "=", /* end-of-command delimitor */
+ "ROM68K :-> ", /* monitor command prompt */
+ "\r", /* end-of-line terminator */
".\r", /* optional command terminator */
&rom68k_ops, /* target operations */
- rom68k_loadtypes, /* loadtypes */
- rom68k_loadprotos, /* loadprotos */
- "9600", /* supported baud rates */
SERIAL_1_STOPBITS, /* number of stop bits */
rom68k_regnames, /* registers names */
MONITOR_OPS_MAGIC /* magic */
rom68k_ops.to_open = rom68k_open;
add_target (&rom68k_ops);
-
- /* This is the default, since it's the only baud rate supported by
- the hardware. */
- baud_rate = 9600;
}