| plan 9 kernel history: overview | file list | diff list |
1991/0913/pc/main.c (diff list | history)
| 1991/0912/sys/src/9/pc/main.c:222,246 – 1991/0913/sys/src/9/pc/main.c:222,265 (short | long | prev | next) | ||
| 1991/0809 | conf.nhard = 1; | |
| 1991/0711 | } | |
| 1991/0716 |
| |
| 1991/0906 |
| |
| 1991/0912 |
| |
| 1991/0913 | char *mathmsg[] = | |
| 1991/0906 | { | |
| 1991/0912 |
| |
| 1991/0907 |
| |
| 1991/0906 |
| |
| 1991/0913 | "invalid", "denormalized", "div-by-zero", "overflow", "underflow", "precision", "stack", "error", }; | |
| 1991/0906 | /* | |
| 1991/0912 | * math coprocessor error */ void | |
| 1991/0913 | matherror(Ureg *ur) | |
| 1991/0912 | { | |
| 1991/0913 | ulong status; int i; char *msg; char note[ERRLEN]; /* * a write cycle to port 0xF0 clears the interrupt latch attached * to the error# line from the 387 */ outb(0xF0, 0xFF); status = fpstatus() & 0xffff; msg = "unknown"; for(i = 0; i < 8; i++) if((1<<i) & status){ msg = mathmsg[i]; break; } sprint(note, "math: %s, status 0x%ux, pc 0x%lux", msg, status, ur->pc); postnote(u->p, 1, note, NDebug); | |
| 1991/0912 | } /* | |
| 1991/0912/sys/src/9/pc/main.c:270,276 – 1991/0913/sys/src/9/pc/main.c:289,294 | ||
| 1991/0906 | void mathover(Ureg *ur) { | |
| 1991/0912 |
| |
| 1991/0907 | pexit("Math overrun", 0); | |
| 1991/0906 | } | |
| 1991/0912/sys/src/9/pc/main.c:277,284 – 1991/0913/sys/src/9/pc/main.c:295,302 | ||
| 1991/0906 | void mathinit(void) { | |
| 1991/0912 |
| |
| 1991/0913 | setvec(Matherr1vec, matherror); setvec(Matherr2vec, matherror); | |
| 1991/0906 | setvec(Mathemuvec, mathemu); setvec(Mathovervec, mathover); } | |
| 1991/0912/sys/src/9/pc/main.c:320,338 – 1991/0913/sys/src/9/pc/main.c:338,343 | ||
| 1991/0712 | } | |
| 1991/0906 | /* | |
| 1991/0716 |
| |
| 1991/0712 |
| |
| 1991/0716 |
| |
| 1991/0712 | ||
| 1991/0716 |
| |
| 1991/0702 |
| |
| 1991/0803 |
| |
| 1991/0912/sys/src/9/pc/main.c:443,450 – 1991/0913/sys/src/9/pc/main.c:448,455 | ||
| 1991/0803 | } /* | |
| 1991/0913 | * power to serial port * onoff == 0 means on | |
| 1991/0803 | * onoff == 1 means off */ int | |
| 1991/0912/sys/src/9/pc/main.c:453,466 – 1991/0913/sys/src/9/pc/main.c:458,483 | ||
| 1991/0803 | return pmuwrbit(1, onoff, 6); } | |
| 1991/0913 | void buzz(int f, int d) | |
| 1991/0803 | { | |
| 1991/0913 | static Rendez br; static QLock bl; qlock(&bl); pmuwrbit(0, 0, 6); tsleep(&br, return0, 0, d); pmuwrbit(0, 1, 6); qunlock(&bl); | |
| 1991/0803 | } | |
| 1991/0913 | void lights(int val) | |
| 1991/0803 | { | |
| 1991/0913 | static QLock ll; qlock(&ll); pmuwrbit(0, (val&1), 4); /* owl */ pmuwrbit(0, ((val>>1)&1), 1); /* mail */ qunlock(&ll); | |
| 1991/0803 | } | |