⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 isr.asm

📁 TestOS - 带简单GUI的DOS扩展OS// 源代码// ASM// 英文
💻 ASM
字号:
unhandled_int:
        pushad
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809E], "U"
        popad
	iret

nmi_interrupt:
        pushad
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809E], "N"
reboot1:
	jmp reboot1
        popad
        iret
clock_tick:
        pushad
        
        mov ax,8h
	mov es,ax	
	;mov esi, stringZ
	;call print_string
	mov byte [es:0xB809E], "C"
	call irq_clear
       
        popad
	iret

keyboard_irq:
        pushad
        ;mov ax,8h
	;mov es,ax	
	;mov byte [es:0xB809C], "K"
	call key_board
        popad
	iret

page_fault:
        pushad
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809C], "P"
        popad
	iret

div_error:
        pushad
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809C], "D"
        popad
	iret

debug_exception:
        pushad
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809C], "d"
        popad
	iret

int3_trap:
        pushad
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809C], "3"
        popad
	iret

into_trap:
        pushad
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809C], "O"
        popad
	iret

bound_trap:
        pushad
	mov byte [es:0xB809C], "B"
        popad
	iret

invalid_instruction:
        pushad
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809C], "I"
      ; call irq_clear
        popad
	iret

no_coprocessor:
        pushad
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809C], "n"
        popad
	iret

double_fault:
        pushad
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809C], "8"
        popad
	iret

coprocessor_segment_overrun:
        pushad
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809C], "9"
        popad
	iret

invalid_tss:
        pushad
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809C], "A"
        popad
	iret

segment_not_present:
        pushad
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809C], "B"
        popad
	iret

stack_fault:
        pushad
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809C], "S"
        popad
	iret

gpf:
        pushad
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809C], "D"
        popad
	iret

coprocessor_error:
        pushad
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809C], "e"
        popad
	iret

alignment_check:
        pushad
	mov byte [es:0xB809C], "F"
        popad
	iret

machine_check:
        pushad
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809C], "G"
        popad
	iret

unhandled_irq:
        pushad
        push es
        
        mov ax,8h
	mov es,ax	
	mov byte [es:0xB809C], "Q"


       ;--------------------------
        mov al, 0x20
	out 0xa0, al
        out 0x20,al
	;call irq_clear
        ;-----------------------
        
        pop   es
        popad
	iret

irq_clear:
	push eax
	mov al, 0x20
	out 0x20, al		; quiet screaming irq chip.
	pop eax
	ret

⌨️ 快捷键说明

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