summaryrefslogtreecommitdiff
path: root/s51/s51.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-12-30 22:35:53 -0800
committerKeith Packard <keithp@keithp.com>2008-12-30 22:38:35 -0800
commit6c2a65c743a4ffae96ed27dbc38c1bf9242ed1df (patch)
treebea5fb122dfcc2edfcff0baca30dd1166a1d24af /s51/s51.h
parentea366058aa467a8a7caf17e7014758f3741ea7f7 (diff)
Save/restore registers to host during memory operations. Cache ROM data.
Because the debug port uses instructions for most operations, the debug code will clobber registers used by the running program. Save and restore these to avoid corrupting application data. If the ROM file is known, use that to return data instead of fetching it from the target to improve performance. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 's51/s51.h')
-rw-r--r--s51/s51.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/s51/s51.h b/s51/s51.h
index eab61452..f4dcce66 100644
--- a/s51/s51.h
+++ b/s51/s51.h
@@ -27,6 +27,23 @@ enum command_result {
command_success, command_debug, command_syntax, command_interrupt, command_error,
};
+struct command_function {
+ char *name;
+ char *alias;
+ enum command_result (*func)(int argc, char **argv);
+ char *usage;
+ char *help;
+};
+
+struct command_function *
+command_string_to_function(struct command_function *functions, char *name);
+
+enum command_result
+command_function_help(struct command_function *functions, int argc, char **argv);
+
+void
+command_syntax_error(int argc, char **argv);
+
enum command_result
command_quit (int argc, char **argv);
@@ -34,6 +51,9 @@ enum command_result
command_help (int argc, char **argv);
enum command_result
+command_stop (int argc, char **argv);
+
+enum command_result
command_di (int argc, char **argv);
enum command_result
@@ -82,6 +102,9 @@ enum command_result
command_status (int argc, char **argv);
enum command_result
+command_info (int argc, char **argv);
+
+enum command_result
cc_wait(void);
void