miniker.asm
来自「C写的小型操作系统源码」· 汇编 代码 · 共 1,890 行 · 第 1/5 页
ASM
1,890 行
pop eax ;;Restore the general registers.
pop eax
mov esp,eax
pop ebp
pop edi
pop esi
pop edx
pop ecx
pop ebx
.ll_continue:
;mov al,0x20 ;;Indicate the interrupt chip we have fin-
;;ished handle the interrupt.
;;:-)
;out 0x20,al
;out 0xa0,al
pop eax
iret
gl_traph_tmp_00:
push eax
cmp dword [gl_general_int_handler],0x00000000
jz .ll_continue
push ebx ;;The following code saves the general
;;registers.
push ecx
push edx
push esi
push edi
push ebp
mov eax,esp
push eax
mov eax,0x00
push eax
call dword [gl_general_int_handler]
pop eax ;;Restore the general registers.
pop eax
mov esp,eax
pop ebp
pop edi
pop esi
pop edx
pop ecx
pop ebx
.ll_continue:
;mov al,0x20 ;;Indicate the interrupt chip we have fin-
;;ished handle the interrupt.
;;:-)
;out 0x20,al
;out 0xa0,al
pop eax
iret
gl_traph_tmp_01:
push eax
cmp dword [gl_general_int_handler],0x00000000
jz .ll_continue
push ebx ;;The following code saves the general
;;registers.
push ecx
push edx
push esi
push edi
push ebp
mov eax,esp
push eax
mov eax,0x01
push eax
call dword [gl_general_int_handler]
pop eax ;;Restore the general registers.
pop eax
mov esp,eax
pop ebp
pop edi
pop esi
pop edx
pop ecx
pop ebx
.ll_continue:
;mov al,0x20 ;;Indicate the interrupt chip we have fin-
;;ished handle the interrupt.
;;:-)
;out 0x20,al
;out 0xa0,al
pop eax
iret
gl_traph_tmp_02:
push eax
cmp dword [gl_general_int_handler],0x00000000
jz .ll_continue
push ebx ;;The following code saves the general
;;registers.
push ecx
push edx
push esi
push edi
push ebp
mov eax,esp
push eax
mov eax,0x02
push eax
call dword [gl_general_int_handler]
pop eax ;;Restore the general registers.
pop eax
mov esp,eax
pop ebp
pop edi
pop esi
pop edx
pop ecx
pop ebx
.ll_continue:
;mov al,0x20 ;;Indicate the interrupt chip we have fin-
;;ished handle the interrupt.
;;:-)
;out 0x20,al
;out 0xa0,al
pop eax
iret
gl_traph_tmp_03:
push eax
cmp dword [gl_general_int_handler],0x00000000
jz .ll_continue
push ebx ;;The following code saves the general
;;registers.
push ecx
push edx
push esi
push edi
push ebp
mov eax,esp
push eax
mov eax,0x03
push eax
call dword [gl_general_int_handler]
pop eax ;;Restore the general registers.
pop eax
mov esp,eax
pop ebp
pop edi
pop esi
pop edx
pop ecx
pop ebx
.ll_continue:
;mov al,0x20 ;;Indicate the interrupt chip we have fin-
;;ished handle the interrupt.
;;:-)
;out 0x20,al
;out 0xa0,al
pop eax
iret
gl_traph_tmp_04:
push eax
cmp dword [gl_general_int_handler],0x00000000
jz .ll_continue
push ebx ;;The following code saves the general
;;registers.
push ecx
push edx
push esi
push edi
push ebp
mov eax,esp
push eax
mov eax,0x04
push eax
call dword [gl_general_int_handler]
pop eax ;;Restore the general registers.
pop eax
mov esp,eax
pop ebp
pop edi
pop esi
pop edx
pop ecx
pop ebx
.ll_continue:
;mov al,0x20 ;;Indicate the interrupt chip we have fin-
;;ished handle the interrupt.
;;:-)
;out 0x20,al
;out 0xa0,al
pop eax
iret
gl_traph_tmp_05:
push eax
cmp dword [gl_general_int_handler],0x00000000
jz .ll_continue
push ebx ;;The following code saves the general
;;registers.
push ecx
push edx
push esi
push edi
push ebp
mov eax,esp
push eax
mov eax,0x05
push eax
call dword [gl_general_int_handler]
pop eax ;;Restore the general registers.
pop eax
mov esp,eax
pop ebp
pop edi
pop esi
pop edx
pop ecx
pop ebx
.ll_continue:
;mov al,0x20 ;;Indicate the interrupt chip we have fin-
;;ished handle the interrupt.
;;:-)
;out 0x20,al
;out 0xa0,al
pop eax
iret
gl_traph_tmp_06:
push eax
cmp dword [gl_general_int_handler],0x00000000
jz .ll_continue
push ebx ;;The following code saves the general
;;registers.
push ecx
push edx
push esi
push edi
push ebp
mov eax,esp
push eax
mov eax,0x06
push eax
call dword [gl_general_int_handler]
pop eax ;;Restore the general registers.
pop eax
mov esp,eax
pop ebp
pop edi
pop esi
pop edx
pop ecx
pop ebx
.ll_continue:
;mov al,0x20 ;;Indicate the interrupt chip we have fin-
;;ished handle the interrupt.
;;:-)
;out 0x20,al
;out 0xa0,al
pop eax
iret
gl_traph_tmp_07:
push eax
cmp dword [gl_general_int_handler],0x00000000
jz .ll_continue
push ebx ;;The following code saves the general
;;registers.
push ecx
push edx
push esi
push edi
push ebp
mov eax,esp
push eax
mov eax,0x07
push eax
call dword [gl_general_int_handler]
pop eax ;;Restore the general registers.
pop eax
mov esp,eax
pop ebp
pop edi
pop esi
pop edx
pop ecx
pop ebx
.ll_continue:
;mov al,0x20 ;;Indicate the interrupt chip we have fin-
;;ished handle the interrupt.
;;:-)
;out 0x20,al
;out 0xa0,al
pop eax
iret
gl_traph_tmp_08:
push eax
cmp dword [gl_general_int_handler],0x00000000
jz .ll_continue
push ebx ;;The following code saves the general
;;registers.
push ecx
push edx
push esi
push edi
push ebp
mov eax,esp
push eax
mov eax,0x08
push eax
call dword [gl_general_int_handler]
pop eax ;;Restore the general registers.
pop eax
mov esp,eax
pop ebp
pop edi
pop esi
pop edx
pop ecx
pop ebx
.ll_continue:
;mov al,0x20 ;;Indicate the interrupt chip we have fin-
;;ished handle the interrupt.
;;:-)
;out 0x20,al
;out 0xa0,al
pop eax
iret
gl_traph_tmp_09:
push eax
cmp dword [gl_general_int_handler],0x00000000
jz .ll_continue
push ebx ;;The following code saves the general
;;registers.
push ecx
push edx
push esi
push edi
push ebp
mov eax,esp
push eax
mov eax,0x09
push eax
call dword [gl_general_int_handler]
pop eax ;;Restore the general registers.
pop eax
mov esp,eax
pop ebp
pop edi
pop esi
pop edx
pop ecx
pop ebx
.ll_continue:
;mov al,0x20 ;;Indicate the interrupt chip we have fin-
;;ished handle the interrupt.
;;:-)
;out 0x20,al
;out 0xa0,al
pop eax
iret
gl_traph_tmp_0a:
push eax
cmp dword [gl_general_int_handler],0x00000000
jz .ll_continue
push ebx ;;The following code saves the general
;;registers.
push ecx
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?