# include "setup.h" # define DRIVE0 0 static spt = 0; # define NBIOSREC 20 # define BIOSFIRST 53 /* * Block I/O routines for the Micro Decision */ biosread () { static char *p; static s, n; spt = findspt (); p = biosbuf; s = BIOSFIRST; for (n = 0; n < NBIOSREC; n++, p += RECSIZE, s++) if (lio (READ, p, s)) fatal ("Can't read bios\n$"); } bioswrite () { static char *p; static s, n; p = biosbuf; s = BIOSFIRST; for (n = 0; n < NBIOSREC; n++, p += RECSIZE, s++) if (lio (WRITE, p, s, n == NBIOSREC - 1)) fatal ("Can't write bios\n$"); } lio (op, addr, sector, last) char *addr; { int t, s; sector--; t = sector / spt; s = sector % spt + 1; return sio (op, addr, t, s, last); } sio (op, addr, track, sector, last) { static char else return callbios (BIOWRT, last, 0); } # define CSELECT 14 # define CGETPARM 31