def_int_exc.inc

来自「小型操作系统,以VC为开发环境,需要boachs调试」· INC 代码 · 共 59 行

INC
59
字号
;/***************************************************************************
;**     File name   : def_int_exc.inc
;**     Author      : x.cheng
;**     Create date :
;**
;**	   Comment:
;**        中断和异常处理的头文件
;**
;**     Revisions:
;**     $Log: def_int_exc.inc,v $
;**     Revision 1.1  2005/08/04 08:43:54  x.cheng
;**     add into repositories
;**
;**
;***************************************************************************/

KERNEL_CODE		EQU	0x08	;//! This is the code selector for the kernel.
KERNEL_DATA		EQU	0x10	;//! This is the data selector for the kernel.
KERNEL_STACK	EQU	0x10	;//! This is the stack selector for the kernel.

USER_CODE		EQU	0x18	;//! This is the selector for the user code segment.
USER_DATA		EQU	0x20	;//! This is the selector for the user data segment.
USER_STACK		EQU	0x20	;//! This is the selector for the user stack segment.

EOI				EQU 0x20	;// end of interrupt

; //! Macro to build a generic interrupt handler entry.
;INTERRUPT_ENTRY szName, ucIrqNb
%macro INTERRUPT_ENTRY 2
	global _%1		; 
	align 4			; 
_%1: 
	push	%2		; 
	jmp	COMMON_ISR	; 
%endmacro

;//! Macro to build a generic interrupt handler routine
;//! with no error code.
;EXCEPTION_ENTRY_NOCODE szName, ucExcNb
%macro EXCEPTION_ENTRY_NOCODE 2
	global _%1		;
	align 4			; 
_%1: 
	push	0		; 
	push	%2		; 
	jmp	COMMON_EXC	;
%endmacro

;//! Macro to build a generic interrupt handler routine
;//! with error code.
;EXCEPTION_ENTRY_CODE szName, ucExcNb
%macro EXCEPTION_ENTRY_CODE 2
	global _%1		; 
	align 4			; 
_%1: 
	push	%2		; 
	jmp	COMMON_EXC	; 
%endmacro

⌨️ 快捷键说明

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