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 733... | Line 733... | ||
733 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
733 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
734 | ; |
734 | ; |
735 | ; Interrupt handler |
735 | ; Interrupt handler |
736 | ; |
736 | ; |
737 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
737 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
- | 738 | ||
738 | align 4 |
739 | align 4 |
739 | int_handler: |
740 | int_handler: |
Line 740... | Line 741... | ||
740 | 741 | ||
Line 741... | Line 742... | ||
741 | DEBUGF 2,"IRQ %x ",eax:2 |
742 | DEBUGF 1,"\n%s int\n", my_service |
742 | - | ||
- | 743 | ||
743 | ; find pointer of device wich made INT occur |
744 | ; find pointer of device wich made INT occur |
- | 745 | ||
- | 746 | mov ecx, [devices] |
|
- | 747 | test ecx, ecx |
|
744 | mov esi, device_list |
748 | jz .nothing |
745 | mov ecx, [devices] |
749 | mov esi, device_list |
Line 746... | Line 750... | ||
746 | .nextdevice: |
750 | .nextdevice: |
747 | mov ebx, [esi] |
751 | mov ebx, [esi] |
748 | 752 | ||
749 | set_io 0 |
- | |
750 | set_io P0_ISR |
753 | set_io 0 |
751 | in al, dx |
- | |
752 | - | ||
753 | DEBUGF 2,"isr %x ",eax:2 |
754 | set_io P0_ISR |
754 | 755 | in al, dx |
|
755 | test al, ISR_PRX ; packet received ok ? |
756 | test al, al |
756 | jnz .rx |
- | |
- | 757 | jnz .got_it |
|
757 | 758 | .continue: |
|
- | 759 | add esi, 4 |
|
758 | add esi, 4 |
760 | dec ecx |
Line -... | Line 761... | ||
- | 761 | jnz .nextdevice |
|
- | 762 | .nothing: |
|
- | 763 | ret |
|
- | 764 | ||
- | 765 | .got_it: |
|
- | 766 | ||
Line 759... | Line 767... | ||
759 | 767 | DEBUGF 1,"Device: %x Status: %x ", ebx, eax:2 |
|
760 | loop .nextdevice |
768 | |
761 | ret |
769 | test al, ISR_PRX ; packet received ok ? |
762 | 770 | jz .no_rx |
|
763 | 771 | ||
Line 764... | Line 772... | ||
764 | ; looks like we've found a device wich received a packet.. |
772 | ; looks like we've found a device wich received a packet.. |
Line 935... | Line 943... | ||
935 | 943 | ||
936 | .fail: |
944 | .fail: |
937 | add esp, 14+8 |
945 | add esp, 14+8 |
938 | .fail_2: |
946 | .fail_2: |
- | 947 | DEBUGF 2,"done\n" |
|
- | 948 | ||
- | 949 | .no_rx: |
|
939 | DEBUGF 2,"done\n" |
950 |