# include "bi.h" # define ORG 0x2800 exec (a, arg) register char *a; { static char *b, *p, f; static n, (*z) (), ret; for (b = a; !iswhite (*b); b++) ; if (*b) *b++ = NULL; /* * set up the command line */ * (char *) 0x80 = lenstr (b); cpystr (0x81, b, NULL); /* * load in the file */ f = open (a, READ, 1); if (f < 0) { putstr (STDERR, a, ": file not found\n", NULL); return; } p = ORG; for (;;) { n = read (f, p, BUFSIZE); if (n <= 0) break; p += n; } close (f); z = ORG; rsave (); ret = (*z) (arg); restore (); cpm (RESETDISK); return ret; }