version 1.3, 2000/08/22 05:03:54 |
version 1.4, 2018/03/29 01:32:50 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/asm/asmiw.c,v 1.2 2000/08/21 08:31:17 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/asm/asmiw.c,v 1.3 2000/08/22 05:03:54 noro Exp $ |
*/ |
*/ |
unsigned int dm(a1,a2,u) |
unsigned int dm(a1,a2,u) |
unsigned int a1,a2,*u; |
unsigned int a1,a2,*u; |
{ |
{ |
__asm |
__asm |
{ |
{ |
mov eax,a1 |
mov eax,a1 |
mul a2 |
mul a2 |
mov ebx,u |
mov ebx,u |
mov DWORD PTR [ebx],edx |
mov DWORD PTR [ebx],edx |
} |
} |
} |
} |
|
|
unsigned int dma(a1,a2,a3,u) |
unsigned int dma(a1,a2,a3,u) |
unsigned int a1,a2,a3,*u; |
unsigned int a1,a2,a3,*u; |
{ |
{ |
__asm |
__asm |
{ |
{ |
mov eax,a1 |
mov eax,a1 |
mul a2 |
mul a2 |
add eax,a3 |
add eax,a3 |
adc edx,0 |
adc edx,0 |
mov ebx,u |
mov ebx,u |
mov DWORD PTR [ebx],edx |
mov DWORD PTR [ebx],edx |
} |
} |
} |
} |
|
|
unsigned int dma2(a1,a2,a3,a4,u) |
unsigned int dma2(a1,a2,a3,a4,u) |
unsigned int a1,a2,a3,a4,*u; |
unsigned int a1,a2,a3,a4,*u; |
{ |
{ |
__asm |
__asm |
{ |
{ |
mov eax,a1 |
mov eax,a1 |
mul a2 |
mul a2 |
add eax,a3 |
add eax,a3 |
adc edx,0 |
adc edx,0 |
add eax,a4 |
add eax,a4 |
adc edx,0 |
adc edx,0 |
mov ebx,u |
mov ebx,u |
mov DWORD PTR [ebx],edx |
mov DWORD PTR [ebx],edx |
} |
} |
} |
} |
|
|
unsigned int dmb(base,a1,a2,u) |
unsigned int dmb(base,a1,a2,u) |
unsigned int base,a1,a2,*u; |
unsigned int base,a1,a2,*u; |
{ |
{ |
__asm |
__asm |
{ |
{ |
mov eax,a1 |
mov eax,a1 |
mul a2 |
mul a2 |
div base |
div base |
mov ebx,u |
mov ebx,u |
mov DWORD PTR [ebx],eax |
mov DWORD PTR [ebx],eax |
mov eax,edx |
mov eax,edx |
} |
} |
} |
} |
|
|
unsigned int dmab(base,a1,a2,a3,u) |
unsigned int dmab(base,a1,a2,a3,u) |
unsigned int base,a1,a2,a3,*u; |
unsigned int base,a1,a2,a3,*u; |
{ |
{ |
__asm |
__asm |
{ |
{ |
mov eax,a1 |
mov eax,a1 |
mul a2 |
mul a2 |
add eax,a3 |
add eax,a3 |
adc edx,0 |
adc edx,0 |
div base |
div base |
mov ebx,u |
mov ebx,u |
mov DWORD PTR [ebx],eax |
mov DWORD PTR [ebx],eax |
mov eax,edx |
mov eax,edx |
} |
} |
} |
} |
|
|
unsigned int dsab(base,a1,a2,u) |
unsigned int dsab(base,a1,a2,u) |
unsigned int base,a1,a2,*u; |
unsigned int base,a1,a2,*u; |
{ |
{ |
__asm |
__asm |
{ |
{ |
mov edx,a1 |
mov edx,a1 |
mov eax,a2 |
mov eax,a2 |
div base |
div base |
mov ebx,u |
mov ebx,u |
mov DWORD PTR [ebx],eax |
mov DWORD PTR [ebx],eax |
mov eax,edx |
mov eax,edx |
} |
} |
} |
} |
|
|
unsigned int dmar(a1,a2,a3,d) |
unsigned int dmar(a1,a2,a3,d) |
unsigned int a1,a2,a3,d; |
unsigned int a1,a2,a3,d; |
{ |
{ |
__asm |
__asm |
{ |
{ |
mov eax,a1 |
mov eax,a1 |
mul a2 |
mul a2 |
add eax,a3 |
add eax,a3 |
adc edx,0 |
adc edx,0 |
div d |
div d |
mov eax,edx |
mov eax,edx |
} |
} |
} |
} |