mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-23 23:33:03 +00:00
Removed -a option from run6502
This commit is contained in:
parent
af46a68f26
commit
142fe13749
@ -382,25 +382,7 @@ static int doSave(int argc, char **argv, M6502 *mpu) /* -l addr size file */
|
|||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int doWrite(int argc, char **argv, M6502 *mpu) /* -w addr "string" */
|
||||||
|
|
||||||
static int doArgs(int argc, char **argv, M6502 *mpu) /* -a addr */
|
|
||||||
{
|
|
||||||
int addr = htol(argv[1]);
|
|
||||||
int size = strlen(argv[2]);
|
|
||||||
int quoted = 0;
|
|
||||||
char *s = malloc(size);
|
|
||||||
strcpy(s, argv[2]);
|
|
||||||
for(int i=0; i<size; i++) {
|
|
||||||
if (s[i] == '\'') quoted = !quoted;
|
|
||||||
else if (!quoted && s[i]==' ') s[i] = 0;
|
|
||||||
}
|
|
||||||
write(mpu, addr, size, s);
|
|
||||||
return 2;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int doWrite(int argc, char **argv, M6502 *mpu) /* -a addr "string" */
|
|
||||||
{
|
{
|
||||||
int addr = htol(argv[1]);
|
int addr = htol(argv[1]);
|
||||||
int size = strlen(argv[2]);
|
int size = strlen(argv[2]);
|
||||||
@ -608,8 +590,7 @@ int main(int argc, char **argv)
|
|||||||
while (++argv, --argc > 0)
|
while (++argv, --argc > 0)
|
||||||
{
|
{
|
||||||
int n= 0;
|
int n= 0;
|
||||||
if (!strcmp(*argv, "-a")) n= doArgs(argc, argv, mpu);
|
if (!strcmp(*argv, "-B")) bTraps= 1;
|
||||||
else if (!strcmp(*argv, "-B")) bTraps= 1;
|
|
||||||
else if (!strcmp(*argv, "-d")) n= doDisassemble(argc, argv, mpu);
|
else if (!strcmp(*argv, "-d")) n= doDisassemble(argc, argv, mpu);
|
||||||
else if (!strcmp(*argv, "-C")) n= doCtrap(argc, argv, mpu);
|
else if (!strcmp(*argv, "-C")) n= doCtrap(argc, argv, mpu);
|
||||||
else if (!strcmp(*argv, "-D")) n= doDebug(argc, argv, mpu);
|
else if (!strcmp(*argv, "-D")) n= doDebug(argc, argv, mpu);
|
||||||
|
Loading…
Reference in New Issue
Block a user