home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BURKS 2
/
BURKS_AUG97.ISO
/
BURKS
/
SOFTWARE
/
LIBS
/
PMC101.ZIP
/
LIBSRC.ZIP
/
SETIRQ.ASM
(
.txt
)
< prev
next >
Wrap
Assembly Source File
|
1994-06-23
|
2KB
|
143 lines
.386p
locals
include pmc.inc
extrn IV_PMGET:near
extrn IV_RMGET:near
extrn IV_PMSET:near
extrn IV_RMSET:near
extrn MBMALLOC:near
extrn SETRMSTUB:near
extrn SETPMSTUB:near
public SETIRQ
_TEXTseg
SETIRQ:
mov ecx,[esp+4+0+00h]
mov eax,[esp+4+0+0ch]
or eax,eax
jmp setirqtbl[ecx*4]
setirqc:
jnz short @@00
push offset _lowheapblock
push IRQCLEN
call MBMALLOC
or eax,eax
jnz short @@00
ret 1ch
@@00:
mov [esp+4+0+0ch],eax
mov ecx,eax
add ecx,_database
shl ecx,12
shr cx,12
mov [esp+4+0+08h],ecx
mov ecx,[esp+4+0+04h]
push eax
push ecx
push RMSTUBINRC
add eax,RMSTUBNRLEN
mov ecx,eax
add ecx,_code_data
xchg ecx,[esp+12+4+0+04h]
push eax
push ecx
call SETPMSTUB
call SETRMSTUB
jmp short setirq
setirqi:
jnz short @@00
push offset _lowheapblock
push IRQILEN
call MBMALLOC
or eax,eax
jnz short @@00
ret 1ch
@@00:
mov [esp+4+0+0ch],eax
mov ecx,eax
add ecx,_database
shl ecx,12
shr cx,12
mov [esp+4+0+08h],ecx
mov ecx,[esp+4+0+04h]
push eax
push ecx
push RMSTUBINRI
call SETRMSTUB
jmp short setirq
setirqown:
mov dword ptr [esp+4+0+0ch],TRUE
setirq:
push ebx
mov ax,900h
int 31h
push eax
mov ebx,[esp+4+8+18h]
mov eax,ebx
shr ebx,3
mov bl,_PICtable[ebx]
and al,7
add bl,al
mov eax,[esp+4+8+14h]
push ebx
push eax
call IV_RMGET
mov eax,[esp+4+8+10h]
push ebx
push eax
call IV_PMGET
xor eax,eax
push ebx
mov ax,[esp+4+4+8+08h]
push eax
mov ax,[esp+8+4+8+08h+2]
push eax
call IV_RMSET
push ebx
mov eax,[esp+4+4+8+04h]
push eax
push cs
call IV_PMSET
pop eax
int 31h
pop ebx
mov eax,[esp+4+0+0ch]
ret 1ch
ends
_DATAseg
setirqtbl dd setirqi,setirqc,setirqown
ends
end