Rev 759 | Rev 764 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 759 | Rev 760 | ||
---|---|---|---|
Line 53... | Line 53... | ||
53 | ;; |
53 | ;; |
54 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
54 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 55... | Line 55... | ||
55 | 55 | ||
Line 56... | Line 56... | ||
56 | include 'macros.inc' |
56 | include 'macros.inc' |
Line 57... | Line 57... | ||
57 | 57 | ||
Line 58... | Line 58... | ||
58 | $Revision: 759 $ |
58 | $Revision: 760 $ |
Line 3931... | Line 3931... | ||
3931 | 3931 | ||
Line 3932... | Line 3932... | ||
3932 | 3932 | ||
- | 3933 | align 4 |
|
- | 3934 | ||
3933 | align 4 |
3935 | get_irq_data: |
3934 | 3936 | movzx esi, bh ; save number of subfunction, if bh = 1, return data size, otherwise, read data |
|
3935 | get_irq_data: |
3937 | xor bh, bh |
Line 3936... | Line 3938... | ||
3936 | cmp ebx,16 |
3938 | cmp ebx, 16 |
Line 3937... | Line 3939... | ||
3937 | jae .not_owner |
3939 | jae .not_owner |
3938 | mov eax, [4 * ebx + irq_owner] |
3940 | mov edx, [4 * ebx + irq_owner] ; check for irq owner |
3939 | 3941 | ||
3940 | mov edi,[TASK_BASE] |
3942 | mov eax,[TASK_BASE] |
3941 | 3943 | ||
- | 3944 | cmp edx,[eax+TASKDATA.pid] |
|
Line 3942... | Line 3945... | ||
3942 | cmp eax,[edi+TASKDATA.pid] |
3945 | je gidril1 |
Line 3943... | Line 3946... | ||
3943 | je gidril1 |
3946 | .not_owner: |
- | 3947 | xor edx, edx |
|
3944 | .not_owner: |
3948 | dec edx |
3945 | mov [esp+28],dword 2 ; ecx=2 |
3949 | jmp gid1 |
3946 | ret |
- | |
3947 | 3950 | ||
3948 | gidril1: |
3951 | gidril1: |
3949 | 3952 | ||
Line 3950... | Line 3953... | ||
3950 | shl ebx,12 |
3953 | shl ebx, 12 |
3951 | xor ecx, ecx |
3954 | lea eax, [ebx + IRQ_SAVE] ; calculate address of the beginning of buffer + 0x0 - data size |
Line 3952... | Line 3955... | ||
3952 | inc ecx |
3955 | mov edx, [eax] ; + 0x4 - data offset |
Line 3953... | Line 3956... | ||
3953 | lea eax,[ebx + IRQ_SAVE] |
3956 | dec esi |
3954 | mov edx,[eax] |
3957 | jz gid1 |
Line 3955... | Line 3958... | ||
3955 | test edx,edx |
3958 | test edx, edx ; check if buffer is empty |
Line 3956... | Line 3959... | ||
3956 | jz gid1 |
3959 | jz gid1 |
3957 | - | ||
3958 | dec edx |
- | |
3959 | mov [eax], edx |
- | |
3960 | - | ||
Line -... | Line 3960... | ||
- | 3960 | ||
- | 3961 | mov ebx, [eax + 0x4] |
|
- | 3962 | mov edi, ecx |
|
- | 3963 | ||
- | 3964 | mov ecx, 4000 ; buffer size, used frequently |
|
- | 3965 | ||
3961 | mov ecx, [eax + 0x4] |
3966 | cmp ebx, ecx ; check for the end of buffer, if end of buffer, begin cycle again |
Line -... | Line 3967... | ||
- | 3967 | jb @f |
|
- | 3968 | ||
- | 3969 | xor ebx, ebx |
|
3962 | 3970 | ||
- | 3971 | @@: |
|
- | 3972 | ||
- | 3973 | lea esi, [ebx + edx] ; calculate data size and offset |
|
- | 3974 | cld |
|
- | 3975 | cmp esi, ecx ; if greater than the buffer size, begin cycle again |
|
- | 3976 | jbe @f |
|
- | 3977 | ||
- | 3978 | sub ecx, ebx |
|
- | 3979 | sub edx, ecx |
|
Line 3963... | Line 3980... | ||
3963 | cmp ecx, 4000 |
3980 | |
3964 | jb @f |
3981 | lea esi, [eax + ebx + 0x10] |
3965 | - | ||
3966 | xor ecx, ecx |
- | |
3967 | 3982 | rep movsb |
|
Line 3968... | Line 3983... | ||
3968 | @@: |
3983 |