📄 mrmuldv.cpp
字号:
/*
* Borland C++ 32-bit compiler (BCC32). Use with mirdef.h32
* Uses inline assembly feature. Suitable for Win32 Apps
* Also compatible with Microsoft Visual C++ 32-bit compiler
*/
#include "inner_support.h"
int muldiv(int a, int b,int c,int m,int *rp)
{
__asm{
mov eax,DWORD PTR a
mul DWORD PTR b
add eax,DWORD PTR c
adc edx,0h
div DWORD PTR m
mov ebx,DWORD PTR rp
mov [ebx],edx
}
}
int muldvm(int a,int c,int m,int *rp)
{
__asm{
mov edx,DWORD PTR a
mov eax,DWORD PTR c
div DWORD PTR m
mov ebx,DWORD PTR rp
mov [ebx],edx
}
}
int muldvd(int a,int b,int c,int *rp)
{
__asm{
mov eax,DWORD PTR a
mul DWORD PTR b
add eax,DWORD PTR c
adc edx,0h
mov ebx,DWORD PTR rp
mov [ebx],eax
mov eax,edx
}
}
void muldvd2(int a, int b,int *c,int *rp)
{
__asm{
mov eax,DWORD PTR a
mul DWORD PTR b
mov ebx,DWORD PTR c
add eax,[ebx]
adc edx,0h
mov esi,DWORD PTR rp
add eax,[esi]
adc edx,0h
mov [esi],eax
mov [ebx],edx
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -