Xv6 with picoc & Linkage editor  v1.0
The project delineate mutual cohesion between c library, linkage editor ( linker), interpreter and operating system by porting the same on xv6 kernel
traps.h
00001 // x86 trap and interrupt constants.
00002 
00003 // Processor-defined:
00004 #define T_DIVIDE         0      // divide error
00005 #define T_DEBUG          1      // debug exception
00006 #define T_NMI            2      // non-maskable interrupt
00007 #define T_BRKPT          3      // breakpoint
00008 #define T_OFLOW          4      // overflow
00009 #define T_BOUND          5      // bounds check
00010 #define T_ILLOP          6      // illegal opcode
00011 #define T_DEVICE         7      // device not available
00012 #define T_DBLFLT         8      // double fault
00013 // #define T_COPROC      9      // reserved (not used since 486)
00014 #define T_TSS           10      // invalid task switch segment
00015 #define T_SEGNP         11      // segment not present
00016 #define T_STACK         12      // stack exception
00017 #define T_GPFLT         13      // general protection fault
00018 #define T_PGFLT         14      // page fault
00019 // #define T_RES        15      // reserved
00020 #define T_FPERR         16      // floating point error
00021 #define T_ALIGN         17      // aligment check
00022 #define T_MCHK          18      // machine check
00023 #define T_SIMDERR       19      // SIMD floating point error
00024 
00025 // These are arbitrarily chosen, but with care not to overlap
00026 // processor defined exceptions or interrupt vectors.
00027 #define T_SYSCALL       64      // system call
00028 #define T_DEFAULT      500      // catchall
00029 
00030 #define T_IRQ0          32      // IRQ 0 corresponds to int T_IRQ
00031 
00032 #define IRQ_TIMER        0
00033 #define IRQ_KBD          1
00034 #define IRQ_COM1         4
00035 #define IRQ_IDE         14
00036 #define IRQ_ERROR       19
00037 #define IRQ_SPURIOUS    31
00038 
 All Data Structures