Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6701 clevermous 1
 
2
3
 
4
 { common
5
    local module,addresses,names,ordinal,count
6
    count = 0
7
   forward
8
    count = count+1
9
   common
10
    dd 0,0,0,RVA module,1
11
    dd count,count,RVA addresses,RVA names,RVA ordinal
12
    addresses:
13
   forward
14
    dd RVA label
15
   common
16
    names:
17
   forward
18
    local name
19
    dd RVA name
20
   common
21
    ordinal: count = 0
22
   forward
23
    dw count
24
    count = count+1
25
   common
26
    module db dllname,0
27
   forward
28
    name db string,0
29
   common
30
    local x,y,z,str1,str2,v1,v2
31
    x = count shr 1
32
    while x > 0
33
     y = x
34
     while y < count
35
      z = y
36
      while z-x >= 0
37
       load v1 dword from names+z*4
38
       str1=($-RVA $)+v1
39
       load v2 dword from names+(z-x)*4
40
       str2=($-RVA $)+v2
41
       while v1 > 0
42
	load v1 from str1+%-1
43
	load v2 from str2+%-1
44
	if v1 <> v2
45
	 break
46
	end if
47
       end while
48
       if v1
49
	load v1 dword from names+z*4
50
	load v2 dword from names+(z-x)*4
51
	store dword v1 at names+(z-x)*4
52
	store dword v2 at names+z*4
53
	load v1 word from ordinal+z*2
54
	load v2 word from ordinal+(z-x)*2
55
	store word v1 at ordinal+(z-x)*2
56
	store word v2 at ordinal+z*2
57
       else
58
	break
59
       end if
60
       z = z-x
61
      end while
62
      y = y+1
63
     end while
64
     x = x shr 1
65
    end while }
66
>