home *** CD-ROM | disk | FTP | other *** search
- /*
- * test program for the very beginnings (brother vax1shot.c)
- */
-
- #include "../h/stdio11.h"
- #include "../h/fifoio.h"
-
- #define YES 1
- #define NO 0
- #define NW 32
-
- struct fifobuf obuf, ibuf;
-
- struct drcdevice *dp = DRC_ADDR;
-
- main()
- {
- int i, code;
-
- setbuf(stdin,NULL);
- setbuf(stdout,NULL);
-
- printf("\nflip switch to Micro and type <return> to begin ");
- while (getchar() != '\n')
- ;
- printf("send to vax :\n");
- for(i = 0; i < NW; ++i) {
- obuf.data[i] = 0125252;
- ibuf.data[i] = 0;
- printf("%o ", obuf.data[i]);
- }
- obuf.wc = NW;
-
- while ((dp->drccsr & FIFO_EMPTY) == 0)
- i = dp->drcbuf;
-
- printf("\ntype <return> to interrupt ");
- while (getchar() != '\n')
- ;
-
- code = dr11(&ibuf, &obuf);
-
- printf("wc = %d code %d\n", ibuf.wc, code);
-
- printf("got from vax :\n");
- for (i = 0; i < NW; ++i) {
- printf("%o ", ibuf.data[i]);
- }
- zexit(0);
- }
-
-
- zexit(n)
- int n;
- {
-
- dp->drccsr = 0;
- printf("\nexit %d\n", n);
- halt();
- }
-