Sync with trunk r64222.
[reactos.git] / boot / freeldr / freeldr / arch / realmode / pnp.inc
1
2
3 PnpBiosGetDeviceNodeCount:
4
5 mov ax, word ptr ds:[BSS_PnpBiosDataSegment]
6 push ax
7
8 push cs
9 mov ax, BSS_PnpNodeSize
10 push ax
11
12 push cs
13 mov ax, BSS_PnpNodeCount
14 push ax
15
16 push 0
17
18 call dword ptr ds:[BSS_PnpBiosEntryPoint]
19 add sp, 12
20
21 movzx ecx, ax
22 mov dword ptr ds:[BSS_PnpResult], ecx
23
24 ret
25
26
27 PnpBiosGetDeviceNode:
28
29 /* push bios segment */
30 mov ax, word ptr ds:[BSS_PnpBiosDataSegment]
31 push ax
32
33 /* push control flag */
34 push 1
35
36 /* push pointer to node buffer (segment/offset) */
37 mov ax, word ptr ds:[BSS_PnpBiosBufferSegment]
38 push ax
39 mov ax, word ptr ds:[BSS_PnpBiosBufferOffset]
40 push ax
41
42 /* push pointer to node number (segment/offset) */
43 push cs
44 mov ax, BSS_PnpNodeNumber
45 push ax
46
47 /* push function number */
48 push 1
49
50 /* call entry point */
51 call dword ptr ds:[BSS_PnpBiosEntryPoint]
52 add sp, 14
53
54 movzx ecx, ax
55 mov dword ptr ds:[BSS_PnpResult], ecx
56
57 ret
58