Rev 4453 | Rev 5522 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4453 | Rev 4522 | ||
---|---|---|---|
1 | ; Macroinstructions for making import section |
1 | ; Macroinstructions for making import section |
2 | ; Based on import32.inc from FASM, with small modifications |
2 | ; Based on import32.inc from FASM, with small modifications |
3 | ; and list of actual kernel exports. |
3 | ; and list of actual kernel exports. |
4 | 4 | ||
5 | macro library [name,string] |
5 | macro library [name,string] |
6 | { common |
6 | { common |
7 | import.data: |
7 | import.data: |
8 | forward |
8 | forward |
9 | local _label |
9 | local _label |
10 | if defined name#.redundant |
10 | if defined name#.redundant |
11 | if ~ name#.redundant |
11 | if ~ name#.redundant |
12 | dd 0,0,0,RVA _label,RVA name#.address |
12 | dd 0,0,0,RVA _label,RVA name#.address |
13 | end if |
13 | end if |
14 | end if |
14 | end if |
15 | name#.referred = 1 |
15 | name#.referred = 1 |
16 | common |
16 | common |
17 | dd 0,0,0,0,0 |
17 | dd 0,0,0,0,0 |
18 | forward |
18 | forward |
19 | if defined name#.redundant |
19 | if defined name#.redundant |
20 | if ~ name#.redundant |
20 | if ~ name#.redundant |
21 | _label db string,0 |
21 | _label db string,0 |
22 | end if |
22 | end if |
23 | end if } |
23 | end if } |
24 | 24 | ||
25 | macro import name,[label] |
25 | macro import name,[label] |
26 | { common |
26 | { common |
27 | rb (- rva $) and 3 |
27 | rb (- rva $) and 3 |
28 | if defined name#.referred |
28 | if defined name#.referred |
29 | name#.address: |
29 | name#.address: |
30 | forward |
30 | forward |
31 | if used label |
31 | if used label |
32 | local _label |
32 | local _label |
33 | label dd RVA _label |
33 | label dd RVA _label |
34 | label#._pe_import = 1 |
34 | label#._pe_import = 1 |
35 | end if |
35 | end if |
36 | common |
36 | common |
37 | if $ > name#.address |
37 | if $ > name#.address |
38 | name#.redundant = 0 |
38 | name#.redundant = 0 |
39 | dw 0 |
39 | dw 0 |
40 | else |
40 | else |
41 | name#.redundant = 1 |
41 | name#.redundant = 1 |
42 | end if |
42 | end if |
43 | forward |
43 | forward |
44 | if used label |
44 | if used label |
45 | _label dw 0 |
45 | _label dw 0 |
46 | db `label |
46 | db `label |
47 | end if |
47 | end if |
48 | common |
48 | common |
49 | db 0 |
49 | db 0 |
50 | end if } |
50 | end if } |
51 | 51 | ||
52 | align 4 |
52 | align 4 |
53 | data import |
53 | data import |
54 | library core,'core.dll' |
54 | library core,'core.dll' |
55 | import core,\ |
55 | import core,\ |
56 | RegService,\ |
56 | RegService,\ |
57 | GetService,\ |
57 | GetService,\ |
58 | ServiceHandler,\ |
58 | ServiceHandler,\ |
59 | AttachIntHandler,\ |
59 | AttachIntHandler,\ |
60 | GetIntHandler,\ |
60 | GetIntHandler,\ |
61 | FpuSave,\ |
61 | FpuSave,\ |
62 | FpuRestore,\ |
62 | FpuRestore,\ |
63 | ReservePortArea,\ |
63 | ReservePortArea,\ |
64 | Boot_Log,\ |
64 | Boot_Log,\ |
65 | \ |
65 | \ |
66 | MutexInit,\ |
66 | MutexInit,\ |
67 | MutexLock,\ |
67 | MutexLock,\ |
68 | MutexUnlock,\ |
68 | MutexUnlock,\ |
69 | \ |
69 | \ |
70 | PciApi,\ |
70 | PciApi,\ |
71 | PciRead32,\ |
71 | PciRead32,\ |
72 | PciRead16,\ |
72 | PciRead16,\ |
73 | PciRead8,\ |
73 | PciRead8,\ |
74 | PciWrite8,\ |
74 | PciWrite8,\ |
75 | PciWrite16,\ |
75 | PciWrite16,\ |
76 | PciWrite32,\ |
76 | PciWrite32,\ |
77 | \ |
77 | \ |
78 | AllocPage,\ |
78 | AllocPage,\ |
79 | AllocPages,\ |
79 | AllocPages,\ |
80 | FreePage,\ |
80 | FreePage,\ |
81 | MapPage,\ |
81 | MapPage,\ |
82 | MapSpace,\ |
82 | MapSpace,\ |
83 | MapIoMem,\ |
83 | MapIoMem,\ |
84 | GetPgAddr,\ |
84 | GetPgAddr,\ |
85 | GetPhysAddr,\ |
85 | GetPhysAddr,\ |
86 | CommitPages,\ |
86 | CommitPages,\ |
87 | ReleasePages,\ |
87 | ReleasePages,\ |
88 | \ |
88 | \ |
89 | AllocKernelSpace,\ |
89 | AllocKernelSpace,\ |
90 | FreeKernelSpace,\ |
90 | FreeKernelSpace,\ |
91 | KernelAlloc,\ |
91 | KernelAlloc,\ |
92 | KernelFree,\ |
92 | KernelFree,\ |
93 | UserAlloc,\ |
93 | UserAlloc,\ |
94 | UserFree,\ |
94 | UserFree,\ |
95 | Kmalloc,\ |
95 | Kmalloc,\ |
96 | Kfree,\ |
96 | Kfree,\ |
97 | CreateRingBuffer,\ |
97 | CreateRingBuffer,\ |
98 | \ |
98 | \ |
99 | GetPid,\ |
99 | GetPid,\ |
100 | CreateThread,\ |
100 | CreateThread,\ |
101 | CreateObject,\ |
101 | CreateObject,\ |
102 | DestroyObject,\ |
102 | DestroyObject,\ |
103 | CreateEvent,\ |
103 | CreateEvent,\ |
104 | RaiseEvent,\ |
104 | RaiseEvent,\ |
105 | WaitEvent,\ |
105 | WaitEvent,\ |
106 | DestroyEvent,\ |
106 | DestroyEvent,\ |
107 | ClearEvent,\ |
107 | ClearEvent,\ |
108 | \ |
108 | \ |
109 | LoadCursor,\ |
109 | LoadCursor,\ |
110 | SelectHwCursor,\ |
110 | SelectHwCursor,\ |
111 | SetHwCursor,\ |
111 | SetHwCursor,\ |
112 | HwCursorRestore,\ |
112 | HwCursorRestore,\ |
113 | HwCursorCreate,\ |
113 | HwCursorCreate,\ |
114 | \ |
114 | \ |
115 | SysMsgBoardStr,\ |
115 | SysMsgBoardStr,\ |
116 | SysMsgBoard,\ |
116 | SysMsgBoard,\ |
117 | GetCurrentTask,\ |
117 | GetCurrentTask,\ |
118 | LoadFile,\ |
118 | LoadFile,\ |
119 | SendEvent,\ |
119 | SendEvent,\ |
120 | SetMouseData,\ |
120 | SetMouseData,\ |
121 | SetKeyboardData,\ |
121 | SetKeyboardData,\ |
122 | RegKeyboard,\ |
122 | RegKeyboard,\ |
123 | DelKeyboard,\ |
123 | DelKeyboard,\ |
124 | Sleep,\ |
124 | Sleep,\ |
125 | GetTimerTicks,\ |
125 | GetTimerTicks,\ |
126 | \ |
126 | \ |
127 | strncat,\ |
127 | strncat,\ |
128 | strncpy,\ |
128 | strncpy,\ |
129 | strncmp,\ |
129 | strncmp,\ |
130 | strnlen,\ |
130 | strnlen,\ |
131 | strchr,\ |
131 | strchr,\ |
132 | strrchr,\ |
132 | strrchr,\ |
133 | \ |
133 | \ |
134 | LFBAddress,\ |
134 | LFBAddress,\ |
135 | GetDisplay,\ |
135 | GetDisplay,\ |
136 | SetScreen,\ |
136 | SetScreen,\ |
137 | \ |
137 | \ |
138 | RegUSBDriver,\ |
138 | RegUSBDriver,\ |
139 | USBOpenPipe,\ |
139 | USBOpenPipe,\ |
140 | USBNormalTransferAsync,\ |
140 | USBNormalTransferAsync,\ |
141 | USBControlTransferAsync,\ |
141 | USBControlTransferAsync,\ |
142 | USBGetParam,\ |
142 | USBGetParam,\ |
143 | USBHCFunc,\ |
143 | USBHCFunc,\ |
144 | \ |
144 | \ |
145 | DiskAdd,\ |
145 | DiskAdd,\ |
146 | DiskMediaChanged,\ |
146 | DiskMediaChanged,\ |
147 | DiskDel,\ |
147 | DiskDel,\ |
148 | \ |
148 | \ |
149 | TimerHS,\ |
149 | TimerHS,\ |
150 | CancelTimerHS,\ |
150 | CancelTimerHS,\ |
151 | \ |
151 | \ |
152 | GetPCIList |
152 | NetRegDev,\ |
- | 153 | NetUnRegDev,\ |
|
- | 154 | NetPtrToNum,\ |
|
- | 155 | NetLinkChanged,\ |
|
- | 156 | Eth_input,\ |
|
- | 157 | IPv4_input,\ |
|
- | 158 | \ |
|
- | 159 | GetPCIList |
|
153 | end data |
160 | end data |