From f0c8cae77c8f9ba3d709d7210ebc2d128a83fe46 Mon Sep 17 00:00:00 2001 From: CSRG Date: Sun, 27 Apr 1986 04:06:22 -0800 Subject: [PATCH] BSD 4_3_Net_2 development Work on file usr/src/usr.bin/lisp/franz/tahoe/fixmask.c Synthesized-from: CSRG/cd2/net.2 --- usr/src/usr.bin/lisp/franz/tahoe/fixmask.c | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 usr/src/usr.bin/lisp/franz/tahoe/fixmask.c diff --git a/usr/src/usr.bin/lisp/franz/tahoe/fixmask.c b/usr/src/usr.bin/lisp/franz/tahoe/fixmask.c new file mode 100644 index 0000000000..2a07411557 --- /dev/null +++ b/usr/src/usr.bin/lisp/franz/tahoe/fixmask.c @@ -0,0 +1,44 @@ +/* +** file: fixmask.c +** new & improved version by P. S. Housel 04/27/86 +** +** note: "changing register save masks" involves making sure r6 and r7 +** are saved for use as "np" and "lbot" +*/ + +/* + * fixmask.c + * complete program to change register save masks on the CCI "tahoe" + * + * (c) copyright 1982, Regents of the University of California + */ + +#include + +char mybuf[BUFSIZ]; +int mask; + +main() +{ + register savesize = 0; + char *cp; + + while(fgets(mybuf,BUFSIZ,stdin) != NULL) + { + if(*mybuf=='#') + if(strcmpn(mybuf,"#protect", 8)==0) + { + savesize = 1; + } + + if(savesize && strcmpn(mybuf," .set L",7)==0) + { + for(cp=mybuf;*cp++!=',';) ; + sscanf(cp, "0x%x", &mask); + sprintf(cp,"0x%X\n", mask | 0x0C0); + savesize = 0; + } + + fputs(mybuf,stdout); + } +} -- 2.20.1