Rev 420 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 420 | Rev 427 | ||
---|---|---|---|
Line 150... | Line 150... | ||
150 | align 4 |
150 | align 4 |
151 | proc get_notify stdcall, p_ev:dword |
151 | proc get_notify stdcall, p_ev:dword |
Line 152... | Line 152... | ||
152 | 152 | ||
153 | .wait: |
153 | .wait: |
154 | mov ebx,[CURRENT_TASK] |
- | |
155 | shl ebx,8 |
154 | mov ebx,[current_slot] |
156 | test dword [ebx+SLOT_BASE+0xA8],EVENT_NOTIFY |
155 | test dword [ebx+APPDATA.event_mask],EVENT_NOTIFY |
157 | jz @f |
156 | jz @f |
158 | and dword [ebx+SLOT_BASE+0xA8], not EVENT_NOTIFY |
157 | and dword [ebx+APPDATA.event_mask], not EVENT_NOTIFY |
159 | mov edi, [p_ev] |
158 | mov edi, [p_ev] |
160 | mov dword [edi], EV_INTR |
159 | mov dword [edi], EV_INTR |
161 | mov eax, [ebx+SLOT_BASE+APPDATA.event] |
160 | mov eax, [ebx+APPDATA.event] |
162 | mov dword [edi+4], eax |
161 | mov dword [edi+4], eax |
163 | ret |
162 | ret |
164 | @@: |
163 | @@: |
165 | call change_task |
164 | call change_task |
Line 992... | Line 991... | ||
992 | pop ebx |
991 | pop ebx |
993 | test eax, eax |
992 | test eax, eax |
994 | jz .fail |
993 | jz .fail |
995 | 994 | ||
Line 996... | Line 995... | ||
996 | mov ecx,[CURRENT_TASK] |
995 | mov ecx,[current_slot] |
997 | shl ecx,8 |
- | |
998 | add ecx, SLOT_BASE+APP_OBJ_OFFSET |
996 | add ecx, APP_OBJ_OFFSET |
Line 999... | Line 997... | ||
999 | 997 | ||
1000 | pushfd |
998 | pushfd |
1001 | cli |
999 | cli |
1002 | mov edx, [ecx+APPOBJ.fd] |
1000 | mov edx, [ecx+APPOBJ.fd] |
Line 1034... | Line 1032... | ||
1034 | call free ;release object memory |
1032 | call free ;release object memory |
1035 | ret |
1033 | ret |
Line -... | Line 1034... | ||
- | 1034 | ||
- | 1035 | ||
- | 1036 | ||
- | 1037 | if 0 |
|
- | 1038 | ||
- | 1039 | irq: |
|
- | 1040 | ||
- | 1041 | .irq0: |
|
- | 1042 | pusfd |
|
- | 1043 | pushad |
|
- | 1044 | push IRQ_0 |
|
- | 1045 | jmp .master |
|
- | 1046 | .irq_1: |
|
- | 1047 | pusfd |
|
- | 1048 | pushad |
|
- | 1049 | push IRQ_1 |
|
- | 1050 | jmp .master |
|
- | 1051 | ||
- | 1052 | .master: |
|
- | 1053 | mov ax, app_data |
|
- | 1054 | mov ds, eax |
|
- | 1055 | mov es, eax |
|
- | 1056 | mov ebx, [esp+4] ;IRQ_xx |
|
- | 1057 | mov eax, [irq_handlers+ebx+4] |
|
- | 1058 | call intr_handler |
|
- | 1059 | mov ecx, [esp+4] |
|
- | 1060 | cmp [irq_actids+ecx*4], 0 |
|
- | 1061 | je @F |
|
- | 1062 | in al, 0x21 |
|
- | 1063 | bts eax, ecx |
|
- | 1064 | out 0x21, al |
|
- | 1065 | mov al, 0x20 |
|
- | 1066 | out 0x20, al |
|
- | 1067 | jmp .restart |
|
- | 1068 | ||
- | 1069 | .slave: |
|
- | 1070 | mov ax, app_data |
|
- | 1071 | mov ds, eax |
|
- | 1072 | mov es, eax |
|
- | 1073 | mov ebx, [esp+4] ;IRQ_xx |
|
- | 1074 | mov eax, [irq_handlers+ebx+4] |
|
- | 1075 | call intr_handler |
|
- | 1076 | mov ecx, [esp+4] |
|
- | 1077 | sub ecx, 8 |
|
- | 1078 | cmp [irq_actids+ecx*4], 0 |
|
- | 1079 | je @F |
|
- | 1080 | in al, 0xA1 |
|
- | 1081 | bts eax, ecx |
|
- | 1082 | out 0xA1, al |
|
- | 1083 | mov al, 0x20 |
|
- | 1084 | out 0xA0, al |
|
- | 1085 | out 0x20, al |
|
- | 1086 | .restart: |
|
- | 1087 | mov ebx, [next_slot] |
|
- | 1088 | test ebx, ebx |
|
- | 1089 | jz @F |
|
- | 1090 | mov [next_task],0 |
|
- | 1091 | mov esi, [prev_slot] |
|
- | 1092 | call do_change_task |
|
- | 1093 | add esp, 4 |
|
- | 1094 | iretd |
|
- | 1095 | ||
- | 1096 | end if |
|
- | 1097 | ||
- | 1098 |