nbsp; ; parameter to oeminterrupthandler msr cpsr_c, #svc_mode:or:0x80 ; switch to supervisor mode w/irqs disabled stmfd sp!, ; save lr onto the svc stack stmfd sp!, ; save irq lr (in r0) onto the svc stack (param) ; ; now we call the oem"s interrupt handler code. it is up to them to ; enable interrupts if they so desire. we can"t do it for them since ; there"s only on interrupt and they haven"t yet defined their nesting. ; call oeminterrupthandler ldmfd sp!, ; dummy pop (parameter) ldmfd sp!, ; restore svc lr from the svc stack msr cpsr_c, #irq_mode:or:0x80 ; switch back to irq mode w/irqs disabled ; restore the saved program status register from the stack. ; ldmfd sp!, ; restore irq spsr from the irq stack msr spsr, r1 ; (r1) = saved status reg ldr lr, =kdata ; (lr) = ptr to kdatastruct cmp r0, #sysintr_resched ;->時(shí)間片已到,進(jìn)行調(diào)度 beq %f10 ;sysintr_devices equ 8 ;是否設(shè)備中斷,中斷號是否有效 ;sysintr_max_devices equ 32 sub r0, r0, #sysintr_devices cmp r0, #sysintr_max_devices ;由此可以看出windowsce的系統(tǒng)中斷號******支持32種從9-40. ;其中第16號(24)被定義為sysintr_firmware ; if not a device request (and not sysintr_resched) ldrhsb r0, [lr, #bresched] ; (r0) = reschedule flag bhs %f20 ; not a device request ;pendevents equ 0x340 ; offset 0x10*sizeof(dword) of ainfo ;device 中斷 ldr r2, [lr, #pendevents] |