FreeCalypso > hg > freecalypso-tools
comparison target-utils/simagent/spenh.c @ 779:8196bba46318
simagent: set-spenh test command implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 13 Mar 2021 19:47:06 +0000 |
parents | |
children | b761029f9c03 |
comparison
equal
deleted
inserted
replaced
778:3ba64341137b | 779:8196bba46318 |
---|---|
1 #include <sys/types.h> | |
2 #include <strings.h> | |
3 #include "types.h" | |
4 #include "simregs.h" | |
5 | |
6 extern u16 conf1_reg; | |
7 | |
8 void | |
9 cmd_set_spenh(argbulk) | |
10 char *argbulk; | |
11 { | |
12 char *argv[2]; | |
13 | |
14 if (parse_args(argbulk, 1, 1, argv, 0) < 0) | |
15 return; | |
16 if (!strcmp(argv[0], "0")) | |
17 SIMREGS.conf1 = conf1_reg &= ~SIM_CONF1_ETU; | |
18 else if (!strcmp(argv[0], "1")) | |
19 SIMREGS.conf1 = conf1_reg |= SIM_CONF1_ETU; | |
20 else | |
21 printf("ERROR: \"0\" or \"1\" argument expected\n"); | |
22 } |