vector.h

来自「raywill写的操作系统内核」· C头文件 代码 · 共 26 行

H
26
字号
#ifndef __I386_VECTOR
#define __I386_VECTOR

/* Set vector(Gate,IRQ,TRAP)*/
typedef struct
{
	unsigned access_byte;	/*	access_byte=0x8E for sysuse */
	unsigned eip;					/*	eip=handler address					*/
} vector_t;

typedef struct
{
/* pushed by pusha */
	unsigned edi, esi, ebp, esp, ebx, edx, ecx, eax;
/* pushed separately */
	unsigned ds, es, fs, gs;
	unsigned which_int, err_code;
/* pushed by exception. Exception may also push err_code.
user_esp and user_ss are pushed only if a privilege change occurs. */
	unsigned eip, cs, eflags, user_esp, user_ss;
} regs_t;

void setvect(vector_t *v, unsigned vect_num);/* in asm */

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?