Subversion Repositories Kolibri OS

Rev

Rev 2852 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2852 Rev 2935
Line 737... Line 737...
737
;;;;;;;;;;;;;;;;;;;;;;;
737
;;;;;;;;;;;;;;;;;;;;;;;
738
;;                   ;;
738
;;                   ;;
739
;; Interrupt handler ;;
739
;; Interrupt handler ;;
740
;;                   ;;
740
;;                   ;;
741
;;;;;;;;;;;;;;;;;;;;;;;
741
;;;;;;;;;;;;;;;;;;;;;;;
-
 
742
 
742
align 4
743
align 4
743
int_handler:
744
int_handler:
Line 744... Line 745...
744
 
745
 
Line 745... Line 746...
745
        DEBUGF  1,"\nIRQ %x\n", eax:2                   ; no, you cant replace 'eax:2' with 'al', this must be a bug in FDO
746
        DEBUGF  1,"\n%s int\n", my_service
Line 746... Line -...
746
 
-
 
747
; find pointer of device wich made IRQ occur
747
 
748
 
748
; find pointer of device wich made IRQ occur
749
        mov     esi, device_list
749
 
-
 
750
        mov     ecx, [devices]
750
        mov     ecx, [devices]
751
        test    ecx, ecx
751
        test    ecx, ecx
752
        jz      .nothing
Line 752... Line 753...
752
        jz      .fail
753
        mov     esi, device_list
753
.nextdevice:
754
  .nextdevice:
754
        mov     ebx, dword [esi]
755
        mov     ebx, [esi]
755
 
756
 
756
        set_io  0
-
 
757
        set_io  REG_ISR
-
 
758
        in      ax , dx
-
 
759
        out     dx , ax                             ; send it back to ACK
757
        set_io  0
760
 
758
        set_io  REG_ISR
761
        add     esi, 4
759
        in      ax, dx
-
 
760
        out     dx, ax                              ; send it back to ACK
762
 
761
        test    ax, ax
763
        test    ax , ax
762
        jnz     .got_it
764
        jnz     .got_it
763
  .continue:
765
 
764
        add     esi, 4
Line 766... Line 765...
766
        dec     ecx
765
        dec     ecx
Line 767... Line -...
767
        jnz     .nextdevice
-
 
768
 
-
 
769
        ret                                         ; If no device was found, abort (The irq was probably for a device, not registered to this driver)
766
        jnz     .nextdevice
Line 770... Line 767...
770
 
767
  .nothing:
771
  .got_it:
768
        ret                                         ; If no device was found, abort (The irq was probably for a device, not registered to this driver)
-
 
769
 
772
 
770
  .got_it:
773
; looks like we've found it!
771
 
774
 
772
        DEBUGF  1,"Device: %x Status: %x ", ebx, ax
Line 775... Line 773...
775
; Lets found out why the irq occured then..
773