-/* $OpenBSD: ncr53cxxx.c,v 1.2 1996/08/31 09:24:07 pefo Exp $ */
+/* $OpenBSD: ncr53cxxx.c,v 1.3 1996/08/31 10:49:16 pefo Exp $ */
/*
* Copyright (c) 1995 Michael L. Hitch
int lineno;
int err_listed;
-int arch = 720;
+int arch;
char inbuf[128];
case 'a':
if (i + 1 == argc)
usage();
+ arch = 0;
+ arch = atoi(argv[i +1]);
+ if(arch != 720 && arch != 710) {
+ fprintf(stderr,"%s: bad arch '%s'\n",
+ argv[0], argv[i +1]);
+ exit(1);
+ }
++i;
break;
default:
listfp = fopen (listfile, "w");
if (errorfile)
errfp = fopen (errorfile, "w");
+ else
+ errfp = stderr;
while (fgets (inbuf, sizeof (inbuf), infp)) {
++lineno;
if (reserved (regs720[i], t))
return i;
}
+ else {
+ errout("'ARCH' statement missing");
+ }
return (-1);
}
void f_arch (void)
{
- /* ?? */
+ int i, archsave;
+
+ i = tokenix;
+
+ archsave = arch;
+ arch = 0;
+ arch = atoi(tokens[i].name);
+ if( arch != 710 && arch != 720) {
+ errout("Unrecognized ARCH");
+ arch = archsave;
+ }
}
void f_proc (void)