00001 ;
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 %define PIC_MASTER_PORT 0x20 ;master 8259
00016 %define PIC_MASTER_PORT2 0x21 ;master 8259
00017 %define PIC_SLAVE_PORT 0xa0 ;slave 8259
00018 %define PIC_SLAVE_PORT2 0xa1 ;slave 8259
00019 %define PIC_EOI 0x20 ;end of interrupt
00020 %define INT_VECTOR_IRQ0 0x20 ;irq0~7=x86 interrupt number 0x20~0x27
00021 %define INT_VECTOR_IRQ8 0x28 ;irq8~f=x86 interrupt number 0x28~0x2f
00022 %define SELECTOR_KERNEL_CS 0x08
00023
00024 ;
00025
00026
00027
00028
00029 extern _Main
00030 extern _PicInit
00031 extern _InterruptIdtTableFill
00032
00033 ;
00034
00035
00036
00037
00038 extern _OsTaskSwitch
00039 extern _OsTaskCurrent
00040 extern _OsTaskNext
00041 extern _OsIntNesting
00042 extern _OsRunning
00043 extern _OsHasIntNesting
00044
00045 ;
00046
00047
00048
00049
00050 global _OsRootTaskStart
00051 global _OsTaskSwitchOut
00052 global _OutByte
00053 global _InByte
00054
00055 ;
00056
00057
00058
00059
00060 global _IdtTable
00061 global _GdtTable
00062 global _IrqHandlersTable
00063 global _IrqExecutorTable
00064 global _CpuIntHandlersTable
00065 global _CpuIntExecutorTable
00066 global _SoftwareIntHandlersTable
00067 global _SoftwareIntExecutorTable
00068
00069 bits 32
00070 [SECTION .bss] ;bss section for uninitialized data
00071 KernelStackSpace: resb 2*1024 ;stack size
00072 KernelStackTop: resb 4 ;these 4 byte is important
00073
00074 [section .data] ;data section for initialized data
00075 _IdtTable: times 512 dd 0x00000000 ;2048 bytes for 256 interrupt descriptors
00076 _IdtLoader:
00077 _IdtByteCount: dw (512*4-1) ;idt size...base 0
00078 _IdtBase: dd _IdtTable ;idt table address
00079
00080 align 8 ;align this to 8 bytes boundary address
00081 _GdtTable: ;global description table
00082 NullGdt:
00083 dd 0x00000000
00084 dd 0x00000000
00085 CodeSegmentGdt:
00086 dd 0x0000FFFF
00087 dd 0x00CF9B00
00088 DataSegmentGdt:
00089 dd 0x0000FFFF
00090 dd 0x00CF9300
00091 GraphicSegmentGdt:
00092 dd 0x80000048
00093 dd 0x00C0930B
00094 align 4
00095 _GdtLoader:
00096 GdtByteCount: dw (6*8-1) ;The gdt content limit.
00097 GdtBase: dd _GdtTable ;The gdt base linear address=cs(PM)+_GdtTable=_GdtTable
00098
00099 align 4
00100 _CpuIntHandlersTable:
00101 CpuInt0Handler: dd 0x00 ;divide by 0
00102 CpuInt1Handler: dd 0x00 ;single step
00103 CpuInt2Handler: dd 0x00 ;nmi
00104 CpuInt3Handler: dd 0x00 ;breakpoint
00105 CpuInt4Handler: dd 0x00 ;overflow
00106 CpuInt5Handler: dd 0x00 ;bound
00107 CpuInt6Handler: dd 0x00 ;invalid opcode
00108 CpuInt7Handler: dd 0x00 ;no fpu
00109 CpuInt8Handler: dd 0x00 ;double fault
00110 CpuInt9Handler: dd 0x00 ;fpu segment overflow
00111 CpuInt10Handler: dd 0x00 ;invalid tss
00112 CpuInt11Handler: dd 0x00 ;invalid segment
00113 CpuInt12Handler: dd 0x00 ;stack overflow
00114 CpuInt13Handler: dd 0x00 ;general protect
00115 CpuInt14Handler: dd 0x00 ;page fault
00116 CpuInt15Handler: dd 0x00 ;undefine...just undefine,not cpu fault
00117 CpuInt16Handler: dd 0x00 ;fpu error
00118 CpuInt17Handler: dd 0x00 ;correction error
00119 CpuInt18Handler: dd 0x00 ;machine error
00120 CpuInt19Handler: dd 0x00 ;simd error
00121 ;IntelReserveInt20Handler: dd 0x00 ;intel reserved
00122 ;IntelReserveInt21Handler: dd 0x00 ;intel reserved
00123 ;IntelReserveInt22Handler: dd 0x00 ;intel reserved
00124 ;IntelReserveInt23Handler: dd 0x00 ;intel reserved
00125 ;IntelReserveInt24Handler: dd 0x00 ;intel reserved
00126 ;IntelReserveInt25Handler: dd 0x00 ;intel reserved
00127 ;IntelReserveInt26Handler: dd 0x00 ;intel reserved
00128 ;IntelReserveInt27Handler: dd 0x00 ;intel reserved
00129 ;IntelReserveInt28Handler: dd 0x00 ;intel reserved
00130 ;IntelReserveInt29Handler: dd 0x00 ;intel reserved
00131 ;IntelReserveInt30Handler: dd 0x00 ;intel reserved
00132 ;IntelReserveInt31Handler: dd 0x00 ;intel reserved
00133
00134 _CpuIntExecutorTable:
00135 dd CpuInt0Executor
00136 dd CpuInt1Executor
00137 dd CpuInt2Executor
00138 dd CpuInt3Executor
00139 dd CpuInt4Executor
00140 dd CpuInt5Executor
00141 dd CpuInt6Executor
00142 dd CpuInt7Executor
00143 dd CpuInt8Executor
00144 dd CpuInt9Executor
00145 dd CpuInt10Executor
00146 dd CpuInt11Executor
00147 dd CpuInt12Executor
00148 dd CpuInt13Executor
00149 dd CpuInt14Executor
00150 dd CpuInt15Executor
00151 dd CpuInt16Executor
00152 dd CpuInt17Executor
00153 dd CpuInt18Executor
00154 dd CpuInt19Executor
00155
00156 _IrqHandlersTable: ;16 handlers in total
00157 Irq0Handler: dd 0x00 ;timer 8254
00158 Irq1Handler: dd 0x00 ;keyboard 8042
00159 Irq2Handler: dd 0x00 ;slave pic 8259
00160 Irq3Handler: dd 0x00 ;com2
00161 Irq4Handler: dd 0x00 ;com1
00162 Irq5Handler: dd 0x00 ;lpt2
00163 Irq6Handler: dd 0x00 ;fdc
00164 Irq7Handler: dd 0x00 ;lpt1
00165 Irq8Handler: dd 0x00 ;rtc
00166 Irq9Handler: dd 0x00 ;redir irq2
00167 Irq10Handler: dd 0x00 ;user
00168 Irq11Handler: dd 0x00 ;user
00169 Irq12Handler: dd 0x00 ;user
00170 Irq13Handler: dd 0x00 ;fpu
00171 Irq14Handler: dd 0x00 ;hdc
00172 Irq15Handler: dd 0x00 ;reserve
00173
00174 _IrqExecutorTable: ;executor for irqs
00175 dd Irq0Executor
00176 dd Irq1Executor
00177 dd Irq2Executor
00178 dd Irq3Executor
00179 dd Irq4Executor
00180 dd Irq5Executor
00181 dd Irq6Executor
00182 dd Irq7Executor
00183 dd Irq8Executor
00184 dd Irq9Executor
00185 dd Irq10Executor
00186 dd Irq11Executor
00187 dd Irq12Executor
00188 dd Irq13Executor
00189 dd Irq14Executor
00190 dd Irq15Executor
00191
00192 _SoftwareIntHandlersTable:
00193 SoftwareInt48Handler: dd 0x00
00194
00195 _SoftwareIntExecutorTable: ;executor for irqs
00196 dd SoftwareInt48Executor ;software int 48 for OsContextSwitch use
00197
00198 [section .text] ;code section for instructions
00199 _EntryStart:
00200 cli ;clear i flag in cpu...disable all maskable interrupt
00201 lgdt [_GdtLoader] ;setup global description table
00202 mov ax,0x10
00203 mov ds,ax ;data segment gdt entry is at 0x10 of _GdtTable
00204 mov ax,0x10 ;ss gdt offset
00205 mov ss,ax ;stack segment gdt entry is at 0x18 of _GdtTable
00206 mov esp,KernelStackTop ;re-iniital esp...mov ss and mov esp must set together
00207 mov ax,0x10 ;es gdt offset
00208 mov es,ax ;extra segment gdt entry is at 0x20 of GdtTable
00209 mov fs,ax ;flag segment is not used,set it to extra segment gdt entry is at 0x20 of GdtTable
00210 mov ax,0x18 ;gs gdt offset
00211 mov gs,ax ;graphics segment is not used,set it to extra segment gdt entry is at 0x28 of GdtTable
00212 jmp SELECTOR_KERNEL_CS:L_SetupIdt ;use jump to enter new protection mode
00213 L_SetupIdt:
00214 call _InterruptIdtTableFill ;setup interrupt description table
00215 lidt [_IdtLoader] ;setup interrupt description table
00216 call _PicInit ;programable interrupt controler initialization
00217 mov eax,_Main ;mov _Main label value to EAX
00218 jmp eax ;jump to _Main
00219
00220 ;
00221
00222
00223
00224
00225 _OutByte:
00226 push ebp
00227 mov ebp,esp
00228 push eax
00229 push edx
00230 mov edx, [ebp + 8] ; port
00231 mov al, [ebp + 0x0c] ; value
00232 out dx, al
00233 pop edx
00234 pop eax
00235 pop ebp
00236 ret
00237 ;
00238
00239
00240
00241
00242
00243 _InByte:
00244 push ebp
00245 mov ebp,esp
00246 push edx
00247 mov edx, [ebp + 8] ; port
00248 xor eax, eax
00249 in al, dx
00250 pop edx
00251 pop ebp
00252 ret
00253 ;
00254
00255
00256
00257
00258 _OsRootTaskStart: ;only executes at main for 1st task running
00259 mov eax,1
00260 mov [_OsRunning],eax
00261 mov eax,[_OsTaskCurrent] ;get current process address
00262 mov esp,[eax] ;get value of pCurrentProcess->Esp
00263 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00264 iretd
00265 ;
00266
00267
00268
00269 _OsTaskSwitchOut:
00270 int 0x30
00271 ret
00272 ;
00273
00274
00275
00276
00277
00278
00279 IrqExit: ;when irq is not reenter,run this code for exit irq,and switch to curent process
00280 mov eax,[_OsTaskSwitch] ;
00281 cmp eax,1 ;if(OsTaskSwitch==1) do task switch
00282 jne L_IrqExitNoSwitchTask ;else no do task switch
00283 L_IrqExitSwitchTask:
00284 xor eax,eax ;_OsTaskSwitch=0;
00285 mov [_OsTaskSwitch],eax ;_OsTaskSwitch=0;
00286 mov eax,[_OsTaskNext] ;get next task pointer
00287 mov [_OsTaskCurrent],eax ;update to current task pointer
00288 mov esp,[eax] ;get value of pCurrentProcess->Esp
00289 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00290 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00291 iretd
00292
00293 L_IrqExitNoSwitchTask:
00294 mov eax,[_OsTaskCurrent] ;set current process address
00295 mov esp,[eax] ;get value of pCurrentProcess->Esp
00296 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00297 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00298 iretd
00299
00300 IrqExitForIrqReenter: ;when irq is reentered,no need to run code above.
00301 mov byte [_OsHasIntNesting],1
00302 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00303 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00304 iretd
00305 ;
00306
00307
00308 Irq0Executor:
00309 pushad ;386up...push all register onto stack...eax,ecx,edx,ebx,esp,ebp,esi,edi
00310 inc dword [_OsIntNesting] ;OsIntNesting++
00311 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00312 jne L_Irq0Reenter ;if _OsIntNesting!=1,jump to reenter code
00313 mov eax,[_OsTaskCurrent] ;get current task control structure address
00314 mov [eax],esp ;save stack pinter ESP value to pTask->Esp
00315 mov esp,KernelStackTop ;switch to kernel stack,s.t. irqs use kernel stack,no use task's stack
00316 push IrqExit ;return address for interrupt handler
00317 jmp L_Irq0Execution ;jump to execution irq code
00318 L_Irq0Reenter:
00319 push IrqExitForIrqReenter ;it is already in kernel stack,now.nested interrupt
00320 L_Irq0Execution:
00321 in al,PIC_MASTER_PORT2 ;mask current interrupt...disable irq0
00322 or al,0x01 ;mask current interrupt...disable irq0
00323 out PIC_MASTER_PORT2,al ;mask current interrupt...disable irq0
00324 mov al,PIC_EOI ;write end of interrupt to pic 8259 master
00325 out PIC_MASTER_PORT,al ;write end of interrupt to pic 8259 master
00326 sti ;enable unmaskable interrupt...allow nested interrupt in irq handler
00327 call dword [Irq0Handler] ;irq handler execution
00328 cli ;disable unmaskable interrupt...disallow nested interrupt in irq handler
00329 in al,PIC_MASTER_PORT2 ;unmask current interrupt...enable irq0
00330 and al,~0x01 ;unmask current interrupt...enable irq0
00331 out PIC_MASTER_PORT2,al ;unmask current interrupt...enable irq0
00332 ret ;reti?? ans:reti will be done in IrqExit...ret will return to IrqExit or IrqExitForIrqReenter
00333
00334 Irq1Executor:
00335 pushad ;386up...push all register onto stack...eax,ecx,edx,ebx,esp,ebp,esi,edi
00336 inc dword [_OsIntNesting] ;OsIntNesting++
00337 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00338 jne L_Irq1Reenter ;if _OsIntNesting!=1,jump to reenter code
00339 mov eax,[_OsTaskCurrent] ;get current task control structure address
00340 mov [eax],esp ;save stack pinter ESP value to pTask->Esp
00341 mov esp,KernelStackTop ;switch to kernel stack,s.t. irqs use kernel stack,no use task's stack
00342 push IrqExit ;return address for interrupt handler
00343 jmp L_Irq1Execution ;jump to execution irq code
00344 L_Irq1Reenter:
00345 push IrqExitForIrqReenter ;it is already in kernel stack,now.nested interrupt
00346 L_Irq1Execution:
00347 in al,PIC_MASTER_PORT2 ;mask current interrupt...disable irq1
00348 or al,0x02 ;mask current interrupt...disable irq1
00349 out PIC_MASTER_PORT2,al ;mask current interrupt...disable irq1
00350 mov al,PIC_EOI ;write end of interrupt to pic 8259
00351 out PIC_MASTER_PORT,al ;write end of interrupt to pic 8259 master
00352 sti ;enable unmaskable interrupt...allow nested interrupt in irq handler
00353 call dword [Irq1Handler] ;irq handler execution
00354 cli ;disable unmaskable interrupt...disallow nested interrupt in irq handler
00355 in al,PIC_MASTER_PORT2 ;unmask current interrupt...ensable irq1
00356 and al,~0x02 ;unmask current interrupt...ensable irq1
00357 out PIC_MASTER_PORT2,al ;unmask current interrupt...ensable irq1
00358 ret ;reti?? ans:reti will be done in IrqExit...ret will return to IrqExit or IrqExitForIrqReenter
00359
00360 Irq2Executor:
00361 pushad ;386up...push all register onto stack...eax,ecx,edx,ebx,esp,ebp,esi,edi
00362 inc dword [_OsIntNesting] ;OsIntNesting++
00363 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00364 jne L_Irq2Reenter ;if _OsIntNesting!=1,jump to reenter code
00365 mov eax,[_OsTaskCurrent] ;get current task control structure address
00366 mov [eax],esp ;save stack pinter ESP value to pTask->Esp
00367 mov esp,KernelStackTop ;switch to kernel stack,s.t. irqs use kernel stack,no use task's stack
00368 push IrqExit ;return address for interrupt handler
00369 jmp L_Irq2Execution ;jump to execution irq code
00370 L_Irq2Reenter:
00371 push IrqExitForIrqReenter ;it is already in kernel stack,now.nested interrupt
00372 L_Irq2Execution:
00373 in al,PIC_MASTER_PORT2 ;mask current interrupt...disable irq2
00374 or al,0x04 ;mask current interrupt...disable irq2
00375 out PIC_MASTER_PORT2,al ;mask current interrupt...disable irq2
00376 mov al,PIC_EOI ;write end of interrupt to pic 8259
00377 out PIC_MASTER_PORT,al ;write end of interrupt to pic 8259 master
00378 sti ;enable unmaskable interrupt...allow nested interrupt in irq handler
00379 call dword [Irq2Handler] ;irq handler execution
00380 cli ;disable unmaskable interrupt...disallow nested interrupt in irq handler
00381 in al,PIC_MASTER_PORT2 ;unmask current interrupt...ensable irq2
00382 and al,~0x04 ;unmask current interrupt...ensable irq2
00383 out PIC_MASTER_PORT2,al ;unmask current interrupt...ensable irq2
00384 ret ;reti?? ans:reti will be done in IrqExit...ret will return to IrqExit or IrqExitForIrqReenter
00385
00386 Irq3Executor:
00387 pushad ;386up...push all register onto stack...eax,ecx,edx,ebx,esp,ebp,esi,edi
00388 inc dword [_OsIntNesting] ;OsIntNesting++
00389 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00390 jne L_Irq3Reenter ;if _OsIntNesting!=1,jump to reenter code
00391 mov eax,[_OsTaskCurrent] ;get current task control structure address
00392 mov [eax],esp ;save stack pinter ESP value to pTask->Esp
00393 mov esp,KernelStackTop ;switch to kernel stack,s.t. irqs use kernel stack,no use task's stack
00394 push IrqExit ;return address for interrupt handler
00395 jmp L_Irq3Execution ;jump to execution irq code
00396 L_Irq3Reenter:
00397 push IrqExitForIrqReenter ;it is already in kernel stack,now.nested interrupt
00398 L_Irq3Execution:
00399 in al,PIC_MASTER_PORT2 ;mask current interrupt...disable irq3
00400 or al,0x08 ;mask current interrupt...disable irq3
00401 out PIC_MASTER_PORT2,al ;mask current interrupt...disable irq3
00402 mov al,PIC_EOI ;write end of interrupt to pic 8259
00403 out PIC_MASTER_PORT,al ;write end of interrupt to pic 8259 master
00404 sti ;enable unmaskable interrupt...allow nested interrupt in irq handler
00405 call dword [Irq3Handler] ;irq handler execution
00406 cli ;disable unmaskable interrupt...disallow nested interrupt in irq handler
00407 in al,PIC_MASTER_PORT2 ;unmask current interrupt...ensable irq3
00408 and al,~0x08 ;unmask current interrupt...ensable irq3
00409 out PIC_MASTER_PORT2,al ;unmask current interrupt...ensable irq3
00410 ret ;reti?? ans:reti will be done in IrqExit...ret will return to IrqExit or IrqExitForIrqReenter
00411
00412 Irq4Executor:
00413 pushad ;386up...push all register onto stack...eax,ecx,edx,ebx,esp,ebp,esi,edi
00414 inc dword [_OsIntNesting] ;OsIntNesting++
00415 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00416 jne L_Irq4Reenter ;if _OsIntNesting!=1,jump to reenter code
00417 mov eax,[_OsTaskCurrent] ;get current task control structure address
00418 mov [eax],esp ;save stack pinter ESP value to pTask->Esp
00419 mov esp,KernelStackTop ;switch to kernel stack,s.t. irqs use kernel stack,no use task's stack
00420 push IrqExit ;return address for interrupt handler
00421 jmp L_Irq4Execution ;jump to execution irq code
00422 L_Irq4Reenter:
00423 push IrqExitForIrqReenter ;it is already in kernel stack,now.nested interrupt
00424 L_Irq4Execution:
00425 in al,PIC_MASTER_PORT2 ;mask current interrupt...disable irq4
00426 or al,0x10 ;mask current interrupt...disable irq4
00427 out PIC_MASTER_PORT2,al ;mask current interrupt...disable irq4
00428 mov al,PIC_EOI ;write end of interrupt to pic 8259
00429 out PIC_MASTER_PORT,al ;write end of interrupt to pic 8259 master
00430 sti ;enable unmaskable interrupt...allow nested interrupt in irq handler
00431 call dword [Irq4Handler] ;irq handler execution
00432 cli ;disable unmaskable interrupt...disallow nested interrupt in irq handler
00433 in al,PIC_MASTER_PORT2 ;unmask current interrupt...ensable irq4
00434 and al,~0x10 ;unmask current interrupt...ensable irq4
00435 out PIC_MASTER_PORT2,al ;unmask current interrupt...ensable irq4
00436 ret ;reti?? ans:reti will be done in IrqExit...ret will return to IrqExit or IrqExitForIrqReenter
00437
00438 Irq5Executor:
00439 pushad ;386up...push all register onto stack...eax,ecx,edx,ebx,esp,ebp,esi,edi
00440 inc dword [_OsIntNesting] ;[_OsIntNesting]==-1 if not reenter....???
00441 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1.............??? i prefer 1,not 0
00442 jne L_Irq5Reenter ;if _OsIntNesting!=1,jump to reenter code
00443 mov eax,[_OsTaskCurrent] ;get current task control structure address
00444 mov [eax],esp ;save stack pinter ESP value to pTask->Esp
00445 mov esp,KernelStackTop ;switch to kernel stack,s.t. irqs use kernel stack,no use task's stack
00446 push IrqExit ;return address for interrupt handler
00447 jmp L_Irq5Execution ;jump to execution irq code
00448 L_Irq5Reenter:
00449 push IrqExitForIrqReenter ;it is already in kernel stack,now.nested interrupt
00450 L_Irq5Execution:
00451 in al,PIC_MASTER_PORT2 ;mask current interrupt...disable irq5
00452 or al,0x20 ;mask current interrupt...disable irq5
00453 out PIC_MASTER_PORT2,al ;mask current interrupt...disable irq5
00454 mov al,PIC_EOI ;write end of interrupt to pic 8259
00455 out PIC_MASTER_PORT,al ;write end of interrupt to pic 8259 master
00456 sti ;enable unmaskable interrupt...allow nested interrupt in irq handler
00457 call dword [Irq5Handler] ;irq handler execution
00458 cli ;disable unmaskable interrupt...disallow nested interrupt in irq handler
00459 in al,PIC_MASTER_PORT2 ;unmask current interrupt...ensable irq5
00460 and al,~0x20 ;unmask current interrupt...ensable irq5
00461 out PIC_MASTER_PORT2,al ;unmask current interrupt...ensable irq5
00462 ret ;reti?? ans:reti will be done in IrqExit...ret will return to IrqExit or IrqExitForIrqReenter
00463
00464 Irq6Executor:
00465 pushad ;386up...push all register onto stack...eax,ecx,edx,ebx,esp,ebp,esi,edi
00466 inc dword [_OsIntNesting] ;OsIntNesting++
00467 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00468 jne L_Irq6Reenter ;if _OsIntNesting!=1,jump to reenter code
00469 mov eax,[_OsTaskCurrent] ;get current task control structure address
00470 mov [eax],esp ;save stack pinter ESP value to pTask->Esp
00471 mov esp,KernelStackTop ;switch to kernel stack,s.t. irqs use kernel stack,no use task's stack
00472 push IrqExit ;return address for interrupt handler
00473 jmp L_Irq6Execution ;jump to execution irq code
00474 L_Irq6Reenter:
00475 push IrqExitForIrqReenter ;it is already in kernel stack,now.nested interrupt
00476 L_Irq6Execution:
00477 in al,PIC_MASTER_PORT2 ;mask current interrupt...disable irq6
00478 or al,0x40 ;mask current interrupt...disable irq6
00479 out PIC_MASTER_PORT2,al ;mask current interrupt...disable irq6
00480 mov al,PIC_EOI ;write end of interrupt to pic 8259
00481 out PIC_MASTER_PORT,al ;write end of interrupt to pic 8259 master
00482 sti ;enable unmaskable interrupt...allow nested interrupt in irq handler
00483 call dword [Irq6Handler] ;irq handler execution
00484 cli ;disable unmaskable interrupt...disallow nested interrupt in irq handler
00485 in al,PIC_MASTER_PORT2 ;unmask current interrupt...ensable irq6
00486 and al,~0x40 ;unmask current interrupt...ensable irq6
00487 out PIC_MASTER_PORT2,al ;unmask current interrupt...ensable irq6
00488 ret ;reti?? ans:reti will be done in IrqExit...ret will return to IrqExit or IrqExitForIrqReenter
00489
00490 Irq7Executor:
00491 pushad ;386up...push all register onto stack...eax,ecx,edx,ebx,esp,ebp,esi,edi
00492 inc dword [_OsIntNesting] ;OsIntNesting++
00493 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00494 jne L_Irq7Reenter ;if _OsIntNesting!=1,jump to reenter code
00495 mov eax,[_OsTaskCurrent] ;get current task control structure address
00496 mov [eax],esp ;save stack pinter ESP value to pTask->Esp
00497 mov esp,KernelStackTop ;switch to kernel stack,s.t. irqs use kernel stack,no use task's stack
00498 push IrqExit ;return address for interrupt handler
00499 jmp L_Irq7Execution ;jump to execution irq code
00500 L_Irq7Reenter:
00501 push IrqExitForIrqReenter ;it is already in kernel stack,now.nested interrupt
00502 L_Irq7Execution:
00503 in al,PIC_MASTER_PORT2 ;mask current interrupt...disable irq7
00504 or al,0x80 ;mask current interrupt...disable irq7
00505 out PIC_MASTER_PORT2,al ;mask current interrupt...disable irq7
00506 mov al,PIC_EOI ;write end of interrupt to pic 8259
00507 out PIC_MASTER_PORT,al ;write end of interrupt to pic 8259 master
00508 sti ;enable unmaskable interrupt...allow nested interrupt in irq handler
00509 call dword [Irq7Handler] ;irq handler execution
00510 cli ;disable unmaskable interrupt...disallow nested interrupt in irq handler
00511 in al,PIC_MASTER_PORT2 ;unmask current interrupt...ensable irq7
00512 and al,~0x80 ;unmask current interrupt...ensable irq7
00513 out PIC_MASTER_PORT2,al ;unmask current interrupt...ensable irq7
00514 ret ;reti?? ans:reti will be done in IrqExit...ret will return to IrqExit or IrqExitForIrqReenter
00515
00516 Irq8Executor:
00517 pushad ;386up...push all register onto stack...eax,ecx,edx,ebx,esp,ebp,esi,edi
00518 inc dword [_OsIntNesting] ;OsIntNesting++
00519 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00520 jne L_Irq8Reenter ;if _OsIntNesting!=1,jump to reenter code
00521 mov eax,[_OsTaskCurrent] ;get current task control structure address
00522 mov [eax],esp ;save stack pinter ESP value to pTask->Esp
00523 mov esp,KernelStackTop ;switch to kernel stack,s.t. irqs use kernel stack,no use task's stack
00524 push IrqExit ;return address for interrupt handler
00525 jmp L_Irq8Execution ;jump to execution irq code
00526 L_Irq8Reenter:
00527 push IrqExitForIrqReenter ;it is already in kernel stack,now.nested interrupt
00528 L_Irq8Execution:
00529 in al,PIC_SLAVE_PORT2 ;mask current interrupt...disable irq8
00530 or al,0x01 ;mask current interrupt...disable irq8
00531 out PIC_SLAVE_PORT2,al ;mask current interrupt...disable irq8
00532 mov al,PIC_EOI ;write end of interrupt to pic 8259
00533 out PIC_MASTER_PORT,al ;write end of interrupt to pic 8259 master
00534 out PIC_SLAVE_PORT,al ;write end of interrupt to pic 8259 slave
00535 sti ;enable unmaskable interrupt...allow nested interrupt in irq handler
00536 call dword [Irq8Handler] ;irq handler execution
00537 cli ;disable unmaskable interrupt...disallow nested interrupt in irq handler
00538 in al,PIC_SLAVE_PORT2 ;unmask current interrupt...ensable irq8
00539 and al,~0x01 ;unmask current interrupt...ensable irq8
00540 out PIC_SLAVE_PORT2,al ;unmask current interrupt...ensable irq8
00541 ret ;reti?? ans:reti will be done in IrqExit...ret will return to IrqExit or IrqExitForIrqReenter
00542
00543 Irq9Executor:
00544 pushad ;386up...push all register onto stack...eax,ecx,edx,ebx,esp,ebp,esi,edi
00545 inc dword [_OsIntNesting] ;OsIntNesting++
00546 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00547 jne L_Irq9Reenter ;if _OsIntNesting!=1,jump to reenter code
00548 mov eax,[_OsTaskCurrent] ;get current task control structure address
00549 mov [eax],esp ;save stack pinter ESP value to pTask->Esp
00550 mov esp,KernelStackTop ;switch to kernel stack,s.t. irqs use kernel stack,no use task's stack
00551 push IrqExit ;return address for interrupt handler
00552 jmp L_Irq9Execution ;jump to execution irq code
00553 L_Irq9Reenter:
00554 push IrqExitForIrqReenter ;it is already in kernel stack,now.nested interrupt
00555 L_Irq9Execution:
00556 in al,PIC_SLAVE_PORT2 ;mask current interrupt...disable irq9
00557 or al,0x02 ;mask current interrupt...disable irq9
00558 out PIC_SLAVE_PORT2,al ;mask current interrupt...disable irq9
00559 mov al,PIC_EOI ;write end of interrupt to pic 8259
00560 out PIC_MASTER_PORT,al ;write end of interrupt to pic 8259 master
00561 out PIC_SLAVE_PORT,al ;write end of interrupt to pic 8259 slave
00562 sti ;enable unmaskable interrupt...allow nested interrupt in irq handler
00563 call dword [Irq9Handler] ;irq handler execution
00564 cli ;disable unmaskable interrupt...disallow nested interrupt in irq handler
00565 in al,PIC_SLAVE_PORT2 ;unmask current interrupt...enable irq9
00566 and al,~0x02 ;unmask current interrupt...enable irq9
00567 out PIC_SLAVE_PORT2,al ;unmask current interrupt...enable irq9
00568 ret ;reti?? ans:reti will be done in IrqExit...ret will return to IrqExit or IrqExitForIrqReenter
00569
00570 Irq10Executor:
00571 pushad ;386up...push all register onto stack...eax,ecx,edx,ebx,esp,ebp,esi,edi
00572 inc dword [_OsIntNesting] ;OsIntNesting++
00573 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00574 jne L_Irq10Reenter ;if _OsIntNesting!=1,jump to reenter code
00575 mov eax,[_OsTaskCurrent] ;get current task control structure address
00576 mov [eax],esp ;save stack pinter ESP value to pTask->Esp
00577 mov esp,KernelStackTop ;switch to kernel stack,s.t. irqs use kernel stack,no use task's stack
00578 push IrqExit ;return address for interrupt handler
00579 jmp L_Irq10Execution ;jump to execution irq code
00580 L_Irq10Reenter:
00581 push IrqExitForIrqReenter ;it is already in kernel stack,now.nested interrupt
00582 L_Irq10Execution:
00583 in al,PIC_SLAVE_PORT2 ;mask current interrupt...disable irq10
00584 or al,0x04 ;mask current interrupt...disable irq10
00585 out PIC_SLAVE_PORT2,al ;mask current interrupt...disable irq10
00586 mov al,PIC_EOI ;write end of interrupt to pic 8259
00587 out PIC_MASTER_PORT,al ;write end of interrupt to pic 8259 master
00588 out PIC_SLAVE_PORT,al ;write end of interrupt to pic 8259 slave
00589 sti ;enable unmaskable interrupt...allow nested interrupt in irq handler
00590 call dword [Irq10Handler] ;irq handler execution
00591 cli ;disable unmaskable interrupt...disallow nested interrupt in irq handler
00592 in al,PIC_SLAVE_PORT2 ;unmask current interrupt...enable irq10
00593 and al,~0x04 ;unmask current interrupt...enable irq10
00594 out PIC_SLAVE_PORT2,al ;unmask current interrupt...enable irq10
00595 ret ;reti?? ans:reti will be done in IrqExit...ret will return to IrqExit or IrqExitForIrqReenter
00596
00597 Irq11Executor:
00598 pushad ;386up...push all register onto stack...eax,ecx,edx,ebx,esp,ebp,esi,edi
00599 inc dword [_OsIntNesting] ;OsIntNesting++
00600 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00601 jne L_Irq11Reenter ;if _OsIntNesting!=1,jump to reenter code
00602 mov eax,[_OsTaskCurrent] ;get current task control structure address
00603 mov [eax],esp ;save stack pinter ESP value to pTask->Esp
00604 mov esp,KernelStackTop ;switch to kernel stack,s.t. irqs use kernel stack,no use task's stack
00605 push IrqExit ;return address for interrupt handler
00606 jmp L_Irq11Execution ;jump to execution irq code
00607 L_Irq11Reenter:
00608 push IrqExitForIrqReenter ;it is already in kernel stack,now.nested interrupt
00609 L_Irq11Execution:
00610 in al,PIC_SLAVE_PORT2 ;mask current interrupt...disable irq11
00611 or al,0x08 ;mask current interrupt...disable irq11
00612 out PIC_SLAVE_PORT2,al ;mask current interrupt...disable irq11
00613 mov al,PIC_EOI ;write end of interrupt to pic 8259
00614 out PIC_MASTER_PORT,al ;write end of interrupt to pic 8259 master
00615 out PIC_SLAVE_PORT,al ;write end of interrupt to pic 8259 slave
00616 sti ;enable unmaskable interrupt...allow nested interrupt in irq handler
00617 call dword [Irq11Handler] ;irq handler execution
00618 cli ;disable unmaskable interrupt...disallow nested interrupt in irq handler
00619 in al,PIC_SLAVE_PORT2 ;unmask current interrupt...enable irq11
00620 and al,~0x08 ;unmask current interrupt...enable irq11
00621 out PIC_SLAVE_PORT2,al ;unmask current interrupt...enable irq11
00622 ret ;reti?? ans:reti will be done in IrqExit...ret will return to IrqExit or IrqExitForIrqReenter
00623
00624 Irq12Executor:
00625 pushad ;386up...push all register onto stack...eax,ecx,edx,ebx,esp,ebp,esi,edi
00626 inc dword [_OsIntNesting] ;OsIntNesting++
00627 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00628 jne L_Irq12Reenter ;if _OsIntNesting!=1,jump to reenter code
00629 mov eax,[_OsTaskCurrent] ;get current task control structure address
00630 mov [eax],esp ;save stack pinter ESP value to pTask->Esp
00631 mov esp,KernelStackTop ;switch to kernel stack,s.t. irqs use kernel stack,no use task's stack
00632 push IrqExit ;return address for interrupt handler
00633 jmp L_Irq12Execution ;jump to execution irq code
00634 L_Irq12Reenter:
00635 push IrqExitForIrqReenter ;it is already in kernel stack,now.nested interrupt
00636 L_Irq12Execution:
00637 in al,PIC_SLAVE_PORT2 ;mask current interrupt...disable irq12
00638 or al,0x10 ;mask current interrupt...disable irq12
00639 out PIC_SLAVE_PORT2,al ;mask current interrupt...disable irq12
00640 mov al,PIC_EOI ;write end of interrupt to pic 8259
00641 out PIC_MASTER_PORT,al ;write end of interrupt to pic 8259 master
00642 out PIC_SLAVE_PORT,al ;write end of interrupt to pic 8259 slave
00643 sti ;enable unmaskable interrupt...allow nested interrupt in irq handler
00644 call dword [Irq12Handler] ;irq handler execution
00645 cli ;disable unmaskable interrupt...disallow nested interrupt in irq handler
00646 in al,PIC_SLAVE_PORT2 ;unmask current interrupt...enable irq12
00647 and al,~0x10 ;unmask current interrupt...enable irq12
00648 out PIC_SLAVE_PORT2,al ;unmask current interrupt...enable irq12
00649 ret ;reti?? ans:reti will be done in IrqExit...ret will return to IrqExit or IrqExitForIrqReenter
00650
00651 Irq13Executor:
00652 pushad ;386up...push all register onto stack...eax,ecx,edx,ebx,esp,ebp,esi,edi
00653 inc dword [_OsIntNesting] ;OsIntNesting++
00654 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00655 jne L_Irq13Reenter ;if _OsIntNesting!=1,jump to reenter code
00656 mov eax,[_OsTaskCurrent] ;get current task control structure address
00657 mov [eax],esp ;save stack pinter ESP value to pTask->Esp
00658 mov esp,KernelStackTop ;switch to kernel stack,s.t. irqs use kernel stack,no use task's stack
00659 push IrqExit ;return address for interrupt handler
00660 jmp L_Irq13Execution ;jump to execution irq code
00661 L_Irq13Reenter:
00662 push IrqExitForIrqReenter ;it is already in kernel stack,now.nested interrupt
00663 L_Irq13Execution:
00664 in al,PIC_SLAVE_PORT2 ;mask current interrupt...disable irq13
00665 or al,0x20 ;mask current interrupt...disable irq13
00666 out PIC_SLAVE_PORT2,al ;mask current interrupt...disable irq13
00667 mov al,PIC_EOI ;write end of interrupt to pic 8259
00668 out PIC_MASTER_PORT,al ;write end of interrupt to pic 8259 master
00669 out PIC_SLAVE_PORT,al ;write end of interrupt to pic 8259 slave
00670 sti ;enable unmaskable interrupt...allow nested interrupt in irq handler
00671 call dword [Irq13Handler] ;irq handler execution
00672 cli ;disable unmaskable interrupt...disallow nested interrupt in irq handler
00673 in al,PIC_SLAVE_PORT2 ;unmask current interrupt...enable irq13
00674 and al,~0x20 ;unmask current interrupt...enable irq13
00675 out PIC_SLAVE_PORT2,al ;unmask current interrupt...enable irq13
00676 ret ;reti?? ans:reti will be done in IrqExit...ret will return to IrqExit or IrqExitForIrqReenter
00677
00678 Irq14Executor:
00679 pushad ;386up...push all register onto stack...eax,ecx,edx,ebx,esp,ebp,esi,edi
00680 inc dword [_OsIntNesting] ;OsIntNesting++
00681 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00682 jne L_Irq14Reenter ;if _OsIntNesting!=1,jump to reenter code
00683 mov eax,[_OsTaskCurrent] ;get current task control structure address
00684 mov [eax],esp ;save stack pinter ESP value to pTask->Esp
00685 mov esp,KernelStackTop ;switch to kernel stack,s.t. irqs use kernel stack,no use task's stack
00686 push IrqExit ;return address for interrupt handler
00687 jmp L_Irq14Execution ;jump to execution irq code
00688 L_Irq14Reenter:
00689 push IrqExitForIrqReenter ;it is already in kernel stack,now.nested interrupt
00690 L_Irq14Execution:
00691 in al,PIC_SLAVE_PORT2 ;mask current interrupt...disable irq14
00692 or al,0x40 ;mask current interrupt...disable irq14
00693 out PIC_SLAVE_PORT2,al ;mask current interrupt...disable irq14
00694 mov al,PIC_EOI ;write end of interrupt to pic 8259
00695 out PIC_MASTER_PORT,al ;write end of interrupt to pic 8259 master
00696 out PIC_SLAVE_PORT,al ;write end of interrupt to pic 8259 slave
00697 sti ;enable unmaskable interrupt...allow nested interrupt in irq handler
00698 call dword [Irq14Handler] ;irq handler execution
00699 cli ;disable unmaskable interrupt...disallow nested interrupt in irq handler
00700 in al,PIC_SLAVE_PORT2 ;unmask current interrupt...enable irq14
00701 and al,~0x40 ;unmask current interrupt...enable irq14
00702 out PIC_SLAVE_PORT2,al ;unmask current interrupt...enable irq14
00703 ret ;reti?? ans:reti will be done in IrqExit...ret will return to IrqExit or IrqExitForIrqReenter
00704
00705 Irq15Executor:
00706 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
00707 inc dword [_OsIntNesting] ;OsIntNesting++
00708 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00709 jne L_Irq15Reenter ;if _OsIntNesting!=1,jump to reenter code
00710 mov eax,[_OsTaskCurrent] ;get current task control structure address
00711 mov [eax],esp ;save stack pinter ESP value to pTask->Esp
00712 mov esp,KernelStackTop ;switch to kernel stack,s.t. irqs use kernel stack,no use task's stack
00713 push IrqExit ;return address for interrupt handler
00714 jmp L_Irq15Execution ;jump to execution irq code
00715 L_Irq15Reenter:
00716 push IrqExitForIrqReenter ;it is already in kernel stack,now.nested interrupt
00717 L_Irq15Execution:
00718 in al,PIC_SLAVE_PORT2 ;mask current interrupt...disable irq15
00719 or al,0x80 ;mask current interrupt...disable irq15
00720 out PIC_SLAVE_PORT2,al ;mask current interrupt...disable irq15
00721 mov al,PIC_EOI ;write end of interrupt to pic 8259
00722 out PIC_MASTER_PORT,al ;write end of interrupt to pic 8259 master
00723 out PIC_SLAVE_PORT,al ;write end of interrupt to pic 8259 slave
00724 sti ;enable unmaskable interrupt...allow nested interrupt in irq handler
00725 call dword [Irq15Handler] ;irq handler execution
00726 cli ;disable unmaskable interrupt...disallow nested interrupt in irq handler
00727 in al,PIC_SLAVE_PORT2 ;unmask current interrupt...enable irq15
00728 and al,~0x80 ;unmask current interrupt...enable irq15
00729 out PIC_SLAVE_PORT2,al ;unmask current interrupt...enable irq15
00730 ret ;reti?? ans:reti will be done in IrqExit...ret will return to IrqExit or IrqExitForIrqReenter
00731
00732 CpuInt0Executor:
00733 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
00734 inc dword [_OsIntNesting] ;OsIntNesting++
00735 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00736 jne L_CpuInt0Reenter ;if _OsIntNesting!=1,jump to reenter code
00737 mov eax,[_OsTaskCurrent] ;get current process address
00738 mov [eax],esp ;get value of pCurrentProcess->Esp
00739 mov esp,KernelStackTop ;use kernel stack
00740 call dword [CpuInt0Handler] ;call handler
00741 mov eax,[_OsTaskNext] ;get next process address
00742 mov [_OsTaskCurrent],eax ;set current process address
00743 mov esp,[eax] ;get value of pCurrentProcess->Esp
00744 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00745 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00746 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00747 L_CpuInt0Reenter:
00748 call dword [CpuInt0Handler] ;call handler
00749 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00750 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00751 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00752
00753 CpuInt1Executor:
00754 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
00755 inc dword [_OsIntNesting] ;OsIntNesting++
00756 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00757 jne L_CpuInt1Reenter ;if _OsIntNesting!=1,jump to reenter code
00758 mov eax,[_OsTaskCurrent] ;get current process address
00759 mov [eax],esp ;get value of pCurrentProcess->Esp
00760 mov esp,KernelStackTop ;use kernel stack
00761 call dword [CpuInt1Handler] ;call handler
00762 mov eax,[_OsTaskNext] ;get next process address
00763 mov [_OsTaskCurrent],eax ;set current process address
00764 mov esp,[eax] ;get value of pCurrentProcess->Esp
00765 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00766 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00767 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00768 L_CpuInt1Reenter:
00769 call dword [CpuInt1Handler] ;call handler
00770 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00771 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00772 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00773
00774 CpuInt2Executor:
00775 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
00776 inc dword [_OsIntNesting] ;OsIntNesting++
00777 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00778 jne L_CpuInt2Reenter ;if _OsIntNesting!=1,jump to reenter code
00779 mov eax,[_OsTaskCurrent] ;get current process address
00780 mov [eax],esp ;get value of pCurrentProcess->Esp
00781 mov esp,KernelStackTop ;use kernel stack
00782 call dword [CpuInt2Handler] ;call handler
00783 mov eax,[_OsTaskNext] ;get next process address
00784 mov [_OsTaskCurrent],eax ;set current process address
00785 mov esp,[eax] ;get value of pCurrentProcess->Esp
00786 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00787 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00788 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00789 L_CpuInt2Reenter:
00790 call dword [CpuInt2Handler] ;call handler
00791 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00792 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00793 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00794
00795 CpuInt3Executor:
00796 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
00797 inc dword [_OsIntNesting] ;OsIntNesting++
00798 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00799 jne L_CpuInt3Reenter ;if _OsIntNesting!=1,jump to reenter code
00800 mov eax,[_OsTaskCurrent] ;get current process address
00801 mov [eax],esp ;get value of pCurrentProcess->Esp
00802 mov esp,KernelStackTop ;use kernel stack
00803 call dword [CpuInt3Handler] ;call handler
00804 mov eax,[_OsTaskNext] ;get next process address
00805 mov [_OsTaskCurrent],eax ;set current process address
00806 mov esp,[eax] ;get value of pCurrentProcess->Esp
00807 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00808 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00809 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00810 L_CpuInt3Reenter:
00811 call dword [CpuInt3Handler] ;call handler
00812 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00813 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00814 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00815
00816 CpuInt4Executor:
00817 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
00818 inc dword [_OsIntNesting] ;OsIntNesting++
00819 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00820 jne L_CpuInt4Reenter ;if _OsIntNesting!=1,jump to reenter code
00821 mov eax,[_OsTaskCurrent] ;get current process address
00822 mov [eax],esp ;get value of pCurrentProcess->Esp
00823 mov esp,KernelStackTop ;use kernel stack
00824 call dword [CpuInt4Handler] ;call handler
00825 mov eax,[_OsTaskNext] ;get next process address
00826 mov [_OsTaskCurrent],eax ;set current process address
00827 mov esp,[eax] ;get value of pCurrentProcess->Esp
00828 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00829 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00830 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00831 L_CpuInt4Reenter:
00832 call dword [CpuInt4Handler] ;call handler
00833 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00834 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00835 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00836
00837 CpuInt5Executor:
00838 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
00839 inc dword [_OsIntNesting] ;OsIntNesting++
00840 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00841 jne L_CpuInt5Reenter ;if _OsIntNesting!=1,jump to reenter code
00842 mov eax,[_OsTaskCurrent] ;get current process address
00843 mov [eax],esp ;get value of pCurrentProcess->Esp
00844 mov esp,KernelStackTop ;use kernel stack
00845 call dword [CpuInt5Handler] ;call handler
00846 mov eax,[_OsTaskNext] ;get next process address
00847 mov [_OsTaskCurrent],eax ;set current process address
00848 mov esp,[eax] ;get value of pCurrentProcess->Esp
00849 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00850 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00851 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00852 L_CpuInt5Reenter:
00853 call dword [CpuInt5Handler] ;call handler
00854 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00855 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00856 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00857
00858 CpuInt6Executor:
00859 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
00860 inc dword [_OsIntNesting] ;OsIntNesting++
00861 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00862 jne L_CpuInt6Reenter ;if _OsIntNesting!=1,jump to reenter code
00863 mov eax,[_OsTaskCurrent] ;get current process address
00864 mov [eax],esp ;get value of pCurrentProcess->Esp
00865 mov esp,KernelStackTop ;use kernel stack
00866 call dword [CpuInt6Handler] ;call handler
00867 mov eax,[_OsTaskNext] ;get next process address
00868 mov [_OsTaskCurrent],eax ;set current process address
00869 mov esp,[eax] ;get value of pCurrentProcess->Esp
00870 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00871 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00872 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00873 L_CpuInt6Reenter:
00874 call dword [CpuInt6Handler] ;call handler
00875 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00876 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00877 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00878
00879 CpuInt7Executor:
00880 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
00881 inc dword [_OsIntNesting] ;OsIntNesting++
00882 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00883 jne L_CpuInt7Reenter ;if _OsIntNesting!=1,jump to reenter code
00884 mov eax,[_OsTaskCurrent] ;get current process address
00885 mov [eax],esp ;get value of pCurrentProcess->Esp
00886 mov esp,KernelStackTop ;use kernel stack
00887 call dword [CpuInt7Handler] ;call handler
00888 mov eax,[_OsTaskNext] ;get next process address
00889 mov [_OsTaskCurrent],eax ;set current process address
00890 mov esp,[eax] ;get value of pCurrentProcess->Esp
00891 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00892 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00893 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00894 L_CpuInt7Reenter:
00895 call dword [CpuInt7Handler] ;call handler
00896 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00897 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00898 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00899
00900 CpuInt8Executor:
00901 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
00902 inc dword [_OsIntNesting] ;OsIntNesting++
00903 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00904 jne L_CpuInt8Reenter ;if _OsIntNesting!=1,jump to reenter code
00905 mov eax,[_OsTaskCurrent] ;get current process address
00906 mov [eax],esp ;get value of pCurrentProcess->Esp
00907 mov esp,KernelStackTop ;use kernel stack
00908 call dword [CpuInt8Handler] ;call handler
00909 mov eax,[_OsTaskNext] ;get next process address
00910 mov [_OsTaskCurrent],eax ;set current process address
00911 mov esp,[eax] ;get value of pCurrentProcess->Esp
00912 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00913 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00914 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00915 L_CpuInt8Reenter:
00916 call dword [CpuInt8Handler] ;call handler
00917 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00918 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00919 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00920
00921 CpuInt9Executor:
00922 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
00923 inc dword [_OsIntNesting] ;OsIntNesting++
00924 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00925 jne L_CpuInt9Reenter ;if _OsIntNesting!=1,jump to reenter code
00926 mov eax,[_OsTaskCurrent] ;get current process address
00927 mov [eax],esp ;get value of pCurrentProcess->Esp
00928 mov esp,KernelStackTop ;use kernel stack
00929 call dword [CpuInt9Handler] ;call handler
00930 mov eax,[_OsTaskNext] ;get next process address
00931 mov [_OsTaskCurrent],eax ;set current process address
00932 mov esp,[eax] ;get value of pCurrentProcess->Esp
00933 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00934 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00935 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00936 L_CpuInt9Reenter:
00937 call dword [CpuInt9Handler] ;call handler
00938 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00939 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00940 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00941
00942 CpuInt10Executor:
00943 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
00944 inc dword [_OsIntNesting] ;OsIntNesting++
00945 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00946 jne L_CpuInt10Reenter ;if _OsIntNesting!=1,jump to reenter code
00947 mov eax,[_OsTaskCurrent] ;get current process address
00948 mov [eax],esp ;get value of pCurrentProcess->Esp
00949 mov esp,KernelStackTop ;use kernel stack
00950 call dword [CpuInt10Handler] ;call handler
00951 mov eax,[_OsTaskNext] ;get next process address
00952 mov [_OsTaskCurrent],eax ;set current process address
00953 mov esp,[eax] ;get value of pCurrentProcess->Esp
00954 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00955 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00956 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00957 L_CpuInt10Reenter:
00958 call dword [CpuInt10Handler] ;call handler
00959 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00960 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00961 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00962
00963 CpuInt11Executor:
00964 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
00965 inc dword [_OsIntNesting] ;OsIntNesting++
00966 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00967 jne L_CpuInt11Reenter ;if _OsIntNesting!=1,jump to reenter code
00968 mov eax,[_OsTaskCurrent] ;get current process address
00969 mov [eax],esp ;get value of pCurrentProcess->Esp
00970 mov esp,KernelStackTop ;use kernel stack
00971 call dword [CpuInt11Handler] ;call handler
00972 mov eax,[_OsTaskNext] ;get next process address
00973 mov [_OsTaskCurrent],eax ;set current process address
00974 mov esp,[eax] ;get value of pCurrentProcess->Esp
00975 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00976 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00977 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00978 L_CpuInt11Reenter:
00979 call dword [CpuInt11Handler] ;call handler
00980 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00981 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00982 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00983
00984 CpuInt12Executor:
00985 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
00986 inc dword [_OsIntNesting] ;OsIntNesting++
00987 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
00988 jne L_CpuInt12Reenter ;if _OsIntNesting!=1,jump to reenter code
00989 mov eax,[_OsTaskCurrent] ;get current process address
00990 mov [eax],esp ;get value of pCurrentProcess->Esp
00991 mov esp,KernelStackTop ;use kernel stack
00992 call dword [CpuInt12Handler] ;call handler
00993 mov eax,[_OsTaskNext] ;get next process address
00994 mov [_OsTaskCurrent],eax ;set current process address
00995 mov esp,[eax] ;get value of pCurrentProcess->Esp
00996 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
00997 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
00998 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
00999 L_CpuInt12Reenter:
01000 call dword [CpuInt12Handler] ;call handler
01001 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
01002 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
01003 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
01004
01005 CpuInt13Executor:
01006 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
01007 inc dword [_OsIntNesting] ;OsIntNesting++
01008 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
01009 jne L_CpuInt13Reenter ;if _OsIntNesting!=1,jump to reenter code
01010 mov eax,[_OsTaskCurrent] ;get current process address
01011 mov [eax],esp ;get value of pCurrentProcess->Esp
01012 mov esp,KernelStackTop ;use kernel stack
01013 call dword [CpuInt13Handler] ;call handler
01014 mov eax,[_OsTaskNext] ;get next process address
01015 mov [_OsTaskCurrent],eax ;set current process address
01016 mov esp,[eax] ;get value of pCurrentProcess->Esp
01017 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
01018 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
01019 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
01020 L_CpuInt13Reenter:
01021 call dword [CpuInt13Handler] ;call handler
01022 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
01023 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
01024 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
01025
01026 CpuInt14Executor:
01027 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
01028 inc dword [_OsIntNesting] ;OsIntNesting++
01029 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
01030 jne L_CpuInt14Reenter ;if _OsIntNesting!=1,jump to reenter code
01031 mov eax,[_OsTaskCurrent] ;get current process address
01032 mov [eax],esp ;get value of pCurrentProcess->Esp
01033 mov esp,KernelStackTop ;use kernel stack
01034 call dword [CpuInt14Handler] ;call handler
01035 mov eax,[_OsTaskNext] ;get next process address
01036 mov [_OsTaskCurrent],eax ;set current process address
01037 mov esp,[eax] ;get value of pCurrentProcess->Esp
01038 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
01039 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
01040 iretd
01041 L_CpuInt14Reenter:
01042 call dword [CpuInt14Handler] ;call handler
01043 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
01044 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
01045 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
01046
01047 CpuInt15Executor:
01048 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
01049 inc dword [_OsIntNesting] ;OsIntNesting++
01050 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
01051 jne L_CpuInt15Reenter ;if _OsIntNesting!=1,jump to reenter code
01052 mov eax,[_OsTaskCurrent] ;get current process address
01053 mov [eax],esp ;get value of pCurrentProcess->Esp
01054 mov esp,KernelStackTop ;use kernel stack
01055 call dword [CpuInt15Handler] ;call handler
01056 mov eax,[_OsTaskNext] ;get next process address
01057 mov [_OsTaskCurrent],eax ;set current process address
01058 mov esp,[eax] ;get value of pCurrentProcess->Esp
01059 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
01060 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
01061 iretd
01062 L_CpuInt15Reenter:
01063 call dword [CpuInt15Handler] ;call handler
01064 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
01065 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
01066 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
01067
01068 CpuInt16Executor:
01069 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
01070 inc dword [_OsIntNesting] ;OsIntNesting++
01071 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
01072 jne L_CpuInt16Reenter ;if _OsIntNesting!=1,jump to reenter code
01073 mov eax,[_OsTaskCurrent] ;get current process address
01074 mov [eax],esp ;get value of pCurrentProcess->Esp
01075 mov esp,KernelStackTop ;use kernel stack
01076 call dword [CpuInt16Handler] ;call handler
01077 mov eax,[_OsTaskNext] ;get next process address
01078 mov [_OsTaskCurrent],eax ;set current process address
01079 mov esp,[eax] ;get value of pCurrentProcess->Esp
01080 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
01081 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
01082 iretd
01083 L_CpuInt16Reenter:
01084 call dword [CpuInt16Handler] ;call handler
01085 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
01086 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
01087 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
01088
01089 CpuInt17Executor:
01090 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
01091 inc dword [_OsIntNesting] ;OsIntNesting++
01092 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
01093 jne L_CpuInt17Reenter ;if _OsIntNesting!=1,jump to reenter code
01094 mov eax,[_OsTaskCurrent] ;get current process address
01095 mov [eax],esp ;get value of pCurrentProcess->Esp
01096 mov esp,KernelStackTop ;use kernel stack
01097 call dword [CpuInt17Handler] ;call handler
01098 mov eax,[_OsTaskNext] ;get next process address
01099 mov [_OsTaskCurrent],eax ;set current process address
01100 mov esp,[eax] ;get value of pCurrentProcess->Esp
01101 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
01102 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
01103 iretd
01104 L_CpuInt17Reenter:
01105 call dword [CpuInt17Handler] ;call handler
01106 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
01107 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
01108 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
01109
01110 CpuInt18Executor:
01111 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
01112 inc dword [_OsIntNesting] ;OsIntNesting++
01113 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
01114 jne L_CpuInt18Reenter ;if _OsIntNesting!=1,jump to reenter code
01115 mov eax,[_OsTaskCurrent] ;get current process address
01116 mov [eax],esp ;get value of pCurrentProcess->Esp
01117 mov esp,KernelStackTop ;use kernel stack
01118 call dword [CpuInt18Handler] ;call handler
01119 mov eax,[_OsTaskNext] ;get next process address
01120 mov [_OsTaskCurrent],eax ;set current process address
01121 mov esp,[eax] ;get value of pCurrentProcess->Esp
01122 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
01123 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
01124 iretd
01125 L_CpuInt18Reenter:
01126 call dword [CpuInt18Handler] ;call handler
01127 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
01128 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
01129 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
01130
01131 CpuInt19Executor:
01132 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
01133 inc dword [_OsIntNesting] ;OsIntNesting++
01134 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
01135 jne L_CpuInt19Reenter ;if _OsIntNesting!=1,jump to reenter code
01136 mov eax,[_OsTaskCurrent] ;get current process address
01137 mov [eax],esp ;get value of pCurrentProcess->Esp
01138 mov esp,KernelStackTop ;use kernel stack
01139 call dword [CpuInt19Handler] ;call handler
01140 mov eax,[_OsTaskNext] ;get next process address
01141 mov [_OsTaskCurrent],eax ;set current process address
01142 mov esp,[eax] ;get value of pCurrentProcess->Esp
01143 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
01144 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
01145 iretd
01146 L_CpuInt19Reenter:
01147 call dword [CpuInt19Handler] ;call handler
01148 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
01149 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
01150 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
01151
01152 ;
01153
01154
01155
01156 SoftwareInt48Executor:
01157 pushad ;push eax,ecx,edx,ebx,esp,ebp,esi,edi
01158 inc dword [_OsIntNesting] ;OsIntNesting++
01159 cmp dword [_OsIntNesting],1 ;check if _OsIntNesting==1
01160 jne L_SoftwareInt48Reenter ;if _OsIntNesting!=1,jump to reenter code
01161 mov eax,[_OsTaskCurrent] ;get current process address
01162 mov [eax],esp ;get value of pCurrentProcess->Esp
01163 mov esp,KernelStackTop ;use kernel stack
01164 call dword [SoftwareInt48Handler] ;call handler
01165 mov eax,[_OsTaskNext] ;get next process address
01166 mov [_OsTaskCurrent],eax ;set current process address
01167 mov esp,[eax] ;get value of pCurrentProcess->Esp
01168 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
01169 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
01170 iretd ;return from interrupt...32 bit instruction
01171 L_SoftwareInt48Reenter:
01172 call dword [SoftwareInt48Handler] ;call handler
01173 dec dword [_OsIntNesting] ;leave this interrupt,decrease Reenter counter
01174 popad ;popad is 32bit of popa...pop out edi,esi,ebp,esp,ebx,edx,ecx,eax
01175 iretd ;return from interrupt...32 bit instruction...eflags,ecs,eip
01176