# include "setup.h" # define DRIVE0 0 /* * Block I/O routines for the Micro Decision */ biosread () { static char *p; static s; p = biosbuf; for (s = BIOSSTART; s < BIOSEND; s++, p += RECSIZE) { if (sio (READ, p, BIOSTRACK, s)) { fatal ("Can't read bios\n$"); } } } bioswrite () { static char *p; static s; p = biosbuf; for (s = BIOSSTART; s < BIOSEND; s++, p += RECSIZE) if (sio (WRITE, p, BIOSTRACK, s, s == BIOSEND - 1)) fatal ("Can't write bios\n$"); } sio (op, addr, track, sector, last) { static char selected [5] = {NO}; callbios (SETDRV, DRIVE0, selected[DRIVE0]); selected[DRIVE0] = YES; callbios (SETTRK, track, 0); callbios (SETSEC, sector, 0); callbios (SETDMA, addr, 0); if (op == READ) return callbios (BIORED, 0, 0); else return callbios (BIOWRT, last, 0); }