4 PUBLIC _bn_mul_add_word
7 _bn_mul_add_word PROC NEAR
12 mov edi,DWORD PTR 20[esp] ; r
13 mov ebx,DWORD PTR 24[esp] ; a
14 mov ecx,DWORD PTR 32[esp] ; w
17 mov ebp,DWORD PTR 28[esp] ; num
23 mov eax,DWORD PTR [ebx] ; edx:eax = *a * w
25 add eax,DWORD PTR [edi] ; *r+=ax
27 add eax,esi ; edx:eax += c
29 mov DWORD PTR [edi],eax ; *r+=ax
30 mov esi,edx ; c = overflow
33 mov eax,DWORD PTR 4[ebx] ; edx:eax = *a * w
35 add eax,DWORD PTR 4[edi] ; *r+=ax
37 add eax,esi ; edx:eax += c
39 mov DWORD PTR 4[edi],eax ; *r+=ax
40 mov esi,edx ; c = overflow
43 mov eax,DWORD PTR 8[ebx] ; edx:eax = *a * w
45 add eax,DWORD PTR 8[edi] ; *r+=ax
47 add eax,esi ; edx:eax += c
49 mov DWORD PTR 8[edi],eax ; *r+=ax
50 mov esi,edx ; c = overflow
53 mov eax,DWORD PTR 12[ebx] ; edx:eax = *a * w
55 add eax,DWORD PTR 12[edi] ; *r+=ax
57 add eax,esi ; edx:eax += c
59 mov DWORD PTR 12[edi],eax ; *r+=ax
60 mov esi,edx ; c = overflow
69 mov ebp,DWORD PTR 28[esp] ; num
74 mov eax,DWORD PTR [ebx] ; edx:eax = *a * w
76 add eax,DWORD PTR [edi] ; *r+=ax
78 add eax,esi ; edx:eax += c
80 mov DWORD PTR [edi],eax ; *r+=ax
81 mov esi,edx ; c = overflow
85 mov eax,DWORD PTR 4[ebx] ; edx:eax = *a * w
87 add eax,DWORD PTR 4[edi] ; *r+=ax
89 add eax,esi ; edx:eax += c
91 mov DWORD PTR 4[edi],eax ; *r+=ax
92 mov esi,edx ; c = overflow
96 mov eax,DWORD PTR 8[ebx] ; edx:eax = *a * w
98 add eax,DWORD PTR 8[edi] ; *r+=ax
100 add eax,esi ; edx:eax += c
102 mov DWORD PTR 8[edi],eax ; *r+=ax
103 mov esi,edx ; c = overflow
112 _bn_mul_add_word ENDP
116 _bn_mul_word PROC NEAR
122 mov edi,DWORD PTR 20[esp] ; r
123 mov ebx,DWORD PTR 24[esp] ; a
124 mov ebp,DWORD PTR 28[esp] ; num
125 mov ecx,DWORD PTR 32[esp] ; w
133 mov eax,DWORD PTR [ebx] ; edx:eax= w * *a
135 add eax,esi ; edx:eax+=c
137 mov DWORD PTR [edi],eax ; *r=eax
140 mov eax,DWORD PTR 4[ebx] ; edx:eax= w * *a
142 add eax,esi ; edx:eax+=c
144 mov DWORD PTR 4[edi],eax ; *r=eax
147 mov eax,DWORD PTR 8[ebx] ; edx:eax= w * *a
149 add eax,esi ; edx:eax+=c
151 mov DWORD PTR 8[edi],eax ; *r=eax
154 mov eax,DWORD PTR 12[ebx] ; edx:eax= w * *a
156 add eax,esi ; edx:eax+=c
158 mov DWORD PTR 12[edi],eax ; *r=eax
168 mov ebp,DWORD PTR 28[esp] ; num
173 mov eax,DWORD PTR [ebx] ; edx:eax= w * *a
175 add eax,esi ; edx:eax+=c
177 mov DWORD PTR [edi],eax ; *r=eax
182 mov eax,DWORD PTR 4[ebx] ; edx:eax= w * *a
184 add eax,esi ; edx:eax+=c
186 mov DWORD PTR 4[edi],eax ; *r=eax
191 mov eax,DWORD PTR 8[ebx] ; edx:eax= w * *a
193 add eax,esi ; edx:eax+=c
195 mov DWORD PTR 8[edi],eax ; *r=eax
209 _bn_sqr_words PROC NEAR
213 mov esi,DWORD PTR 16[esp] ; r
214 mov edi,DWORD PTR 20[esp] ; a
215 mov ebx,DWORD PTR 24[esp] ; num
221 mov eax, DWORD PTR [edi]
223 mov DWORD PTR [esi],eax
224 mov DWORD PTR 4[esi],edx
226 mov eax, DWORD PTR 4[edi]
228 mov DWORD PTR 8[esi],eax
229 mov DWORD PTR 12[esi],edx
231 mov eax, DWORD PTR 8[edi]
233 mov DWORD PTR 16[esi],eax
234 mov DWORD PTR 20[esi],edx
236 mov eax, DWORD PTR 12[edi]
238 mov DWORD PTR 24[esi],eax
239 mov DWORD PTR 28[esi],edx
248 mov ebx,DWORD PTR 24[esp] ; num
253 mov eax, DWORD PTR [edi]
255 mov DWORD PTR [esi],eax
256 mov DWORD PTR 4[esi],edx
260 mov eax, DWORD PTR 4[edi]
262 mov DWORD PTR 8[esi],eax
263 mov DWORD PTR 12[esi],edx
267 mov eax, DWORD PTR 8[edi]
269 mov DWORD PTR 16[esi],eax
270 mov DWORD PTR 20[esi],edx
282 mov edx, DWORD PTR 4[esp]
283 mov eax, DWORD PTR 8[esp]
284 div DWORD PTR 12[esp]