|
|
1.1 ! root 1: /* test.c - main */ ! 2: ! 3: #include <conf.h> ! 4: #include <kernel.h> ! 5: #include <tty.h> ! 6: ! 7: /*------------------------------------------------------------------------ ! 8: * main -- exercise panic, using console "C" ! 9: *------------------------------------------------------------------------ ! 10: */ ! 11: main() ! 12: { ! 13: int *try; ! 14: ! 15: kprintf ("testing panic...\n"); ! 16: #ifdef UVAXII ! 17: kprintf("cpmbx = %x\n", (int)*((short *)0x200b801c)); ! 18: #endif ! 19: kprintf("about to test halting:\n"); ! 20: halt(); ! 21: kprintf("hit a key for _panic test:\n"); ! 22: control(CONSOLE, TCMODER); ! 23: getc(CONSOLE); ! 24: panic ("testing out panic"); ! 25: kprintf("hit a key to force bus error\n"); ! 26: getc(CONSOLE); ! 27: try = (int *)0xfffff000; ! 28: *try = 0; ! 29: kprintf("hit a key to jump to 0\n"); ! 30: getc(CONSOLE); ! 31: asm ("jmp lowcore"); ! 32: kprintf("testing all done...\n"); ! 33: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.