2013-12-30 15:20:25 +04:00
|
|
|
|
|
|
|
; Macroinstructions for making import section
|
|
|
|
; Based on import32.inc from FASM, with small modifications
|
|
|
|
; and list of actual kernel exports.
|
|
|
|
|
|
|
|
macro library [name,string]
|
|
|
|
{ common
|
|
|
|
import.data:
|
|
|
|
forward
|
|
|
|
local _label
|
|
|
|
if defined name#.redundant
|
|
|
|
if ~ name#.redundant
|
|
|
|
dd 0,0,0,RVA _label,RVA name#.address
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
name#.referred = 1
|
|
|
|
common
|
|
|
|
dd 0,0,0,0,0
|
|
|
|
forward
|
|
|
|
if defined name#.redundant
|
|
|
|
if ~ name#.redundant
|
|
|
|
_label db string,0
|
|
|
|
end if
|
|
|
|
end if }
|
|
|
|
|
|
|
|
macro import name,[label]
|
|
|
|
{ common
|
|
|
|
rb (- rva $) and 3
|
|
|
|
if defined name#.referred
|
|
|
|
name#.address:
|
|
|
|
forward
|
|
|
|
if used label
|
|
|
|
local _label
|
|
|
|
label dd RVA _label
|
|
|
|
label#._pe_import = 1
|
|
|
|
end if
|
|
|
|
common
|
|
|
|
if $ > name#.address
|
|
|
|
name#.redundant = 0
|
|
|
|
dw 0
|
|
|
|
else
|
|
|
|
name#.redundant = 1
|
|
|
|
end if
|
|
|
|
forward
|
|
|
|
if used label
|
|
|
|
_label dw 0
|
2014-01-23 21:47:35 +04:00
|
|
|
db `label
|
2013-12-30 15:20:25 +04:00
|
|
|
end if
|
|
|
|
common
|
|
|
|
db 0
|
|
|
|
end if }
|
|
|
|
|
|
|
|
align 4
|
|
|
|
data import
|
|
|
|
library core,'core.dll'
|
|
|
|
import core,\
|
|
|
|
RegService,\
|
|
|
|
GetService,\
|
|
|
|
ServiceHandler,\
|
|
|
|
AttachIntHandler,\
|
|
|
|
GetIntHandler,\
|
|
|
|
FpuSave,\
|
|
|
|
FpuRestore,\
|
|
|
|
ReservePortArea,\
|
|
|
|
Boot_Log,\
|
|
|
|
\
|
|
|
|
MutexInit,\
|
|
|
|
MutexLock,\
|
|
|
|
MutexUnlock,\
|
|
|
|
\
|
|
|
|
PciApi,\
|
|
|
|
PciRead32,\
|
|
|
|
PciRead16,\
|
|
|
|
PciRead8,\
|
|
|
|
PciWrite8,\
|
|
|
|
PciWrite16,\
|
|
|
|
PciWrite32,\
|
|
|
|
\
|
|
|
|
AllocPage,\
|
|
|
|
AllocPages,\
|
|
|
|
FreePage,\
|
|
|
|
MapPage,\
|
|
|
|
MapSpace,\
|
|
|
|
MapIoMem,\
|
|
|
|
GetPgAddr,\
|
|
|
|
GetPhysAddr,\
|
|
|
|
CommitPages,\
|
|
|
|
ReleasePages,\
|
|
|
|
\
|
|
|
|
AllocKernelSpace,\
|
|
|
|
FreeKernelSpace,\
|
|
|
|
KernelAlloc,\
|
|
|
|
KernelFree,\
|
|
|
|
UserAlloc,\
|
|
|
|
UserFree,\
|
|
|
|
Kmalloc,\
|
|
|
|
Kfree,\
|
|
|
|
CreateRingBuffer,\
|
2014-08-25 13:49:27 +04:00
|
|
|
AllocDMA24,\
|
2013-12-30 15:20:25 +04:00
|
|
|
\
|
|
|
|
GetPid,\
|
|
|
|
CreateThread,\
|
|
|
|
CreateObject,\
|
|
|
|
DestroyObject,\
|
|
|
|
CreateEvent,\
|
|
|
|
RaiseEvent,\
|
|
|
|
WaitEvent,\
|
|
|
|
DestroyEvent,\
|
|
|
|
ClearEvent,\
|
|
|
|
\
|
|
|
|
LoadCursor,\
|
|
|
|
SelectHwCursor,\
|
|
|
|
SetHwCursor,\
|
|
|
|
HwCursorRestore,\
|
|
|
|
HwCursorCreate,\
|
|
|
|
\
|
|
|
|
SysMsgBoardStr,\
|
|
|
|
SysMsgBoard,\
|
|
|
|
GetCurrentTask,\
|
|
|
|
LoadFile,\
|
|
|
|
SendEvent,\
|
|
|
|
SetMouseData,\
|
|
|
|
SetKeyboardData,\
|
|
|
|
RegKeyboard,\
|
|
|
|
DelKeyboard,\
|
|
|
|
Sleep,\
|
|
|
|
GetTimerTicks,\
|
|
|
|
\
|
|
|
|
strncat,\
|
|
|
|
strncpy,\
|
|
|
|
strncmp,\
|
|
|
|
strnlen,\
|
|
|
|
strchr,\
|
|
|
|
strrchr,\
|
|
|
|
\
|
|
|
|
LFBAddress,\
|
|
|
|
GetDisplay,\
|
|
|
|
SetScreen,\
|
|
|
|
\
|
|
|
|
RegUSBDriver,\
|
|
|
|
USBOpenPipe,\
|
|
|
|
USBNormalTransferAsync,\
|
|
|
|
USBControlTransferAsync,\
|
|
|
|
USBGetParam,\
|
|
|
|
USBHCFunc,\
|
|
|
|
\
|
|
|
|
DiskAdd,\
|
|
|
|
DiskMediaChanged,\
|
|
|
|
DiskDel,\
|
|
|
|
\
|
|
|
|
TimerHS,\
|
2014-01-15 00:50:19 +04:00
|
|
|
CancelTimerHS,\
|
2014-01-23 21:47:35 +04:00
|
|
|
\
|
|
|
|
NetRegDev,\
|
|
|
|
NetUnRegDev,\
|
|
|
|
NetPtrToNum,\
|
|
|
|
NetLinkChanged,\
|
2015-03-18 00:50:29 +03:00
|
|
|
EthInput,\
|
|
|
|
NetAlloc,\
|
|
|
|
NetFree,\
|
2014-01-15 00:50:19 +04:00
|
|
|
\
|
|
|
|
GetPCIList
|
2013-12-30 15:20:25 +04:00
|
|
|
end data
|