.386p
locals
_TEXT segment dword public use32 'CODE'
_TEXT ends
_DATA segment dword public use32 'DATA'
_DATA ends
_BSS segment dword public use32 'BSS'
_BSS ends
DGROUP group _DATA, _BSS
assume cs:_TEXT, ds:DGROUP
extrn _rs:dword, _database:dword, _zerosel:word, _pmcrmnoregs:dword
extrn _pmcrmregs:dword, _pmcrminoregs:dword, _pmcrmiregs:dword
extrn _rmstackbase:word, _rmstacktop:word
public CALLRMRINT, CALLRMRFAR, CALLRMRIRET
public CALLRMNRINT, CALLRMNRFAR, CALLRMNRIRET
_TEXT segment dword public use32 'CODE'
assume cs:_TEXT, ds:DGROUP
CALLRMRINT:
mov eax,[esp+4+0+00h]
mov fs,_zerosel
mov ecx,fs:[eax*4]
mov edx,_pmcrmiregs
jmp short callrm
CALLRMRFAR:
mov ecx,[esp+4+0+00h]
mov edx,_pmcrmregs
jmp short callrm
CALLRMRIRET:
mov ecx,[esp+4+0+00h]
mov edx,_pmcrmiregs
jmp short callrm
CALLRMNRINT:
mov eax,[esp+4+0+00h]
mov fs,_zerosel
mov ecx,fs:[eax*4]
mov edx,_pmcrminoregs
jmp short callrm
CALLRMNRFAR:
mov ecx,[esp+4+0+00h]
mov edx,_pmcrmnoregs
jmp short callrm
CALLRMNRIRET:
mov ecx,[esp+4+0+00h]
mov edx,_pmcrminoregs
jmp short callrm
callrm:
push ebx esi edi ebp
mov ebp,ecx
xor eax,eax
mov cx,_rmstacktop
cmp cx,_rmstackbase
jbe short @@00
call edx
mov eax,1
@@00:
pop ebp edi esi ebx
ret 04h
_TEXT ends
end