FreeCalypso > hg > freecalypso-sw
comparison loadtools/ltdispatch.c @ 27:ae6294b8a015
loadtool: exit jump0 implemented
| author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
|---|---|
| date | Sat, 04 May 2013 06:22:09 +0000 |
| parents | e658a84b37df |
| children | dacf45e3d20f |
comparison
equal
deleted
inserted
replaced
| 26:1a3bbab2ea26 | 27:ae6294b8a015 |
|---|---|
| 8 #include <strings.h> | 8 #include <strings.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 | 10 |
| 11 extern char loadtool_command[]; | 11 extern char loadtool_command[]; |
| 12 | 12 |
| 13 extern int cmd_exit(); | |
| 13 extern int loadtool_cmd_passthru(); | 14 extern int loadtool_cmd_passthru(); |
| 14 | |
| 15 static int | |
| 16 exitcmd() | |
| 17 { | |
| 18 exit(0); | |
| 19 } | |
| 20 | 15 |
| 21 static struct cmdtab { | 16 static struct cmdtab { |
| 22 char *cmd; | 17 char *cmd; |
| 23 int minargs; | 18 int minargs; |
| 24 int maxargs; | 19 int maxargs; |
| 25 int (*func)(); | 20 int (*func)(); |
| 26 } cmdtab[] = { | 21 } cmdtab[] = { |
| 27 {"dump", 2, 2, loadtool_cmd_passthru}, | 22 {"dump", 2, 2, loadtool_cmd_passthru}, |
| 28 {"exit", 0, 0, &exitcmd}, | 23 {"exit", 0, 1, cmd_exit}, |
| 29 {"quit", 0, 0, &exitcmd}, | 24 {"quit", 0, 1, cmd_exit}, |
| 30 {"r8", 1, 1, loadtool_cmd_passthru}, | 25 {"r8", 1, 1, loadtool_cmd_passthru}, |
| 31 {"r16", 1, 1, loadtool_cmd_passthru}, | 26 {"r16", 1, 1, loadtool_cmd_passthru}, |
| 32 {"r32", 1, 1, loadtool_cmd_passthru}, | 27 {"r32", 1, 1, loadtool_cmd_passthru}, |
| 33 {"w8", 2, 2, loadtool_cmd_passthru}, | 28 {"w8", 2, 2, loadtool_cmd_passthru}, |
| 34 {"w16", 2, 2, loadtool_cmd_passthru}, | 29 {"w16", 2, 2, loadtool_cmd_passthru}, |
